mirror of
https://github.com/mat-1/azalea.git
synced 2025-08-02 14:26:04 +00:00
fix codegen
This commit is contained in:
parent
0d55c71cee
commit
f38d0660d1
1 changed files with 9 additions and 4 deletions
|
@ -80,8 +80,14 @@ def burger_type_to_rust_type(burger_type, field_name: Optional[str] = None, inst
|
||||||
enum_first_part_name)
|
enum_first_part_name)
|
||||||
print('enum_first_part_obfuscated_name',
|
print('enum_first_part_obfuscated_name',
|
||||||
enum_first_part_obfuscated_name)
|
enum_first_part_obfuscated_name)
|
||||||
|
print('enum field', enum_field.split('.')[1].split('(')[0])
|
||||||
|
try:
|
||||||
enum_name = mappings.get_method_type(
|
enum_name = mappings.get_method_type(
|
||||||
enum_first_part_obfuscated_name, enum_field.split('.')[1].split('(')[0], '')
|
enum_first_part_obfuscated_name, enum_field.split('.')[1].split('(')[0], '')
|
||||||
|
except KeyError:
|
||||||
|
# sometimes enums are fields instead of methods
|
||||||
|
enum_name = mappings.get_field_type(
|
||||||
|
enum_first_part_obfuscated_name, enum_field.split('.')[1].split('(')[0])
|
||||||
|
|
||||||
print('hm', enum_name)
|
print('hm', enum_name)
|
||||||
else:
|
else:
|
||||||
|
@ -160,4 +166,3 @@ def clean_property_name(property_name):
|
||||||
property_name = 'kind'
|
property_name = 'kind'
|
||||||
|
|
||||||
return property_name
|
return property_name
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue