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

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

Issue 814543006: Move //mojo/{public, edk} underneath //third_party (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 11 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
(Empty)
1 {%- macro enum_def(prefix, enum) -%}
2 {%- set prev_enum = 0 %}
3 {%- for field in enum.fields %}
4 {%- if field.value %}
5 {{prefix}}final int {{enum.name}}_{{field.name}} = {{field.value|expression_to_t ext}};
6 {%- elif loop.first %}
7 {{prefix}}final int {{enum.name}}_{{field.name}} = 0;
8 {%- else %}
9 {{prefix}}final int {{enum.name}}_{{field.name}} = {{enum.name}}_{{enum.fields[l oop.index0 - 1].name}} + 1;
10 {%- endif %}
11 {%- endfor %}
12 {%- endmacro %}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698