When running gdradon cc on a GDScript with a Property definition in it, the gd2py convertor throws an exception:
Traceback (most recent call last):
File "Python/3.9/bin/gd2py", line 8, in <module>
sys.exit(main())
File "Python/3.9/lib/python/site-packages/gdtoolkit/gd2py/__main__.py", line 34, in main
print(convert_code(handle.read()))
File "Python/3.9/lib/python/site-packages/gdtoolkit/gd2py/__init__.py", line 24, in convert_code
converted_lines = _convert_block(parse_tree.children, context)
File "Python/3.9/lib/python/site-packages/gdtoolkit/gd2py/__init__.py", line 31, in _convert_block
converted_lines += _convert_statement(statement, context)
File "Python/3.9/lib/python/site-packages/gdtoolkit/gd2py/__init__.py", line 115, in _convert_statement
return handlers[statement.data](statement, context)
KeyError: Token('RULE', 'property_body_def')
I am happy to open a PR with this if preferred, but I patched this locally by passing it in the statement conversion in gdtoolkit/gd2py/__init__.py_convert_statement, eg:
...
"enum_stmt": _pass, # TODO: implement
"classname_stmt": _pass,
"property_body_def": _pass, # This was added here
"classname_extends_stmt": _pass,
"signal_stmt": _pass,
...
When running
gdradon cc
on a GDScript with a Property definition in it, the gd2py convertor throws an exception:I am happy to open a PR with this if preferred, but I patched this locally by passing it in the statement conversion in
gdtoolkit/gd2py/__init__.py
_convert_statement
, eg: