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:
James Westman 2024-04-06 13:36:22 -05:00
parent ea4c7245be
commit c1a82a034b
49 changed files with 396 additions and 151 deletions

View file

@ -266,7 +266,7 @@ def decompile_submenu(ctx, gir, id=None):
ctx.print("submenu {")
@decompiler("item")
@decompiler("item", parent_tag="menu")
def decompile_item(ctx, gir, id=None):
if id:
ctx.print(f"item {id} {{")