| OLD | NEW |
| 1 {#--- Begin #} | 1 {#--- Begin #} |
| 2 | 2 |
| 3 {%- import "encoding_macros.tmpl" as encoding_macros %} | 3 {%- import "encoding_macros.tmpl" as encoding_macros %} |
| 4 {%- import "mojom_type_macros.tmpl" as mojom_type_macros %} | |
| 5 {%- macro enum_def(union) %} | 4 {%- macro enum_def(union) %} |
| 6 enum {{union|name}}Tag { | 5 enum {{union|name}}Tag { |
| 7 {%- for field in union.fields %} | 6 {%- for field in union.fields %} |
| 8 {{field|name}}, | 7 {{field|name}}, |
| 9 {%- endfor %} | 8 {%- endfor %} |
| 10 unknown | 9 unknown |
| 11 } | 10 } |
| 12 {%- endmacro %} | 11 {%- endmacro %} |
| 13 | 12 |
| 14 {%- macro wrapper_def(union) %} | 13 {%- macro wrapper_def(union) %} |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 return result; | 104 return result; |
| 106 } | 105 } |
| 107 } | 106 } |
| 108 {%- endmacro %} | 107 {%- endmacro %} |
| 109 | 108 |
| 110 | 109 |
| 111 {%- macro union_def(union, typepkg, package) %} | 110 {%- macro union_def(union, typepkg, package) %} |
| 112 {{enum_def(union)}} | 111 {{enum_def(union)}} |
| 113 {{wrapper_def(union)}} | 112 {{wrapper_def(union)}} |
| 114 | 113 |
| 115 {% if should_gen_mojom_types -%} | |
| 116 {{ mojom_type_macros.writeMojomTypeDef(union, typepkg, package) }} | |
| 117 {%- endif -%} | |
| 118 {%- endmacro %} | 114 {%- endmacro %} |
| OLD | NEW |