Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(429)

Side by Side Diff: mojo/public/tools/bindings/generators/dart_templates/union_definition.tmpl

Issue 1753013002: Mojom runtime type info: New implementation for Dart. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: No changes to sha1s Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 %}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698