OLD | NEW |
1 {#--- Begin #} | 1 {#--- Begin #} |
2 | 2 |
3 class {{struct.name}} implements bindings.MojoType<{{struct.name}}> { | 3 class {{struct.name}} { |
4 {#--- Enums #} | 4 {#--- Enums #} |
5 {%- from "enum_definition.tmpl" import enum_def %} | 5 {%- from "enum_definition.tmpl" import enum_def %} |
6 {% for enum in struct.enums %} | 6 {% for enum in struct.enums %} |
7 {{enum_def(" static ", enum)}} | 7 {{enum_def(" static ", enum)}} |
8 {%- endfor %} | 8 {%- endfor %} |
9 | 9 |
10 | 10 |
11 {#--- Constants #} | 11 {#--- Constants #} |
12 {% for constant in struct.constants %} | 12 {% for constant in struct.constants %} |
13 static final {{constant.name}} = {{constant.value|expression_to_text}}; | 13 static final {{constant.name}} = {{constant.value|expression_to_text}}; |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 {%- for packed_field in byte.packed_fields %} | 65 {%- for packed_field in byte.packed_fields %} |
66 encoder.{{packed_field.field.kind|encode_snippet}}val.{{packed_field.field.n
ame}}); | 66 encoder.{{packed_field.field.kind|encode_snippet}}val.{{packed_field.field.n
ame}}); |
67 {%- endfor %} | 67 {%- endfor %} |
68 {%- endif %} | 68 {%- endif %} |
69 {%- if byte.is_padding %} | 69 {%- if byte.is_padding %} |
70 encoder.skip(1); | 70 encoder.skip(1); |
71 {%- endif %} | 71 {%- endif %} |
72 {%- endfor %} | 72 {%- endfor %} |
73 } | 73 } |
74 } | 74 } |
OLD | NEW |