mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
decompiler: Add more decompilable tags
Add more tags to the list of things the decompiler can handle. This required some changes to track the containing object class in the DecompileCtx, since some objects use the same tag names. The improved support means we can test the decompiler on most of the test suite. Any new test samples will by default be tested to ensure the decompiler produces the original blueprint file. Also, updated the decompiler to always use double quotes.
This commit is contained in:
parent
ea4c7245be
commit
c1a82a034b
49 changed files with 396 additions and 151 deletions
|
@ -904,6 +904,10 @@ class Namespace(GirNode):
|
|||
|
||||
def get_type_by_cname(self, cname: str) -> T.Optional[GirType]:
|
||||
"""Gets a type from this namespace by its C name."""
|
||||
for basic in _BASIC_TYPES.values():
|
||||
if basic.glib_type_name == cname:
|
||||
return basic()
|
||||
|
||||
for item in self.entries.values():
|
||||
if (
|
||||
hasattr(item, "cname")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue