File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,10 +27,17 @@ func mapped_kwd(value)
2727 ret to_mapped_kwd(lang, value)
2828end
2929~}}
30- {{~ for nullable_field in table.nullable_fields ~}}
31- {{~ if nullable_field.is_primitive || nullable_field.is_enum ~}}
32- include "nullable_{{ nullable_field.fixed_namespace | array.add nullable_field.type | array.join '_' | string.downcase }}.fbs";
33- {{~ end ~}}
30+ {{~
31+ include_set = []
32+ for nullable_field in table.nullable_fields
33+ if nullable_field.is_primitive || nullable_field.is_enum
34+ include_str = "include \"nullable_" + (nullable_field.fixed_namespace | array.add nullable_field.type | array.join '_' | string.downcase) + ".fbs\";"
35+ include_set = include_set | array.add include_str | array.uniq
36+ end
37+ end
38+ ~}}
39+ {{~ for include_str in include_set ~}}
40+ {{ include_str }}
3441{{~ end ~}}
3542{{~ for reference_file in table.reference_files ~}}
3643include "{{ reference_file }}.fbs";
You can’t perform that action at this time.
0 commit comments