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

Unified Diff: mojo/public/tools/bindings/generators/java_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 side-by-side diff with in-line comments
Download patch
Index: mojo/public/tools/bindings/generators/java_templates/enum_definition.tmpl
diff --git a/mojo/public/tools/bindings/generators/java_templates/enum_definition.tmpl b/mojo/public/tools/bindings/generators/java_templates/enum_definition.tmpl
deleted file mode 100644
index a16c178e67ee653ae2aed891f8123ce7114431f0..0000000000000000000000000000000000000000
--- a/mojo/public/tools/bindings/generators/java_templates/enum_definition.tmpl
+++ /dev/null
@@ -1,21 +0,0 @@
-{%- macro enum_value(enum, field, index) -%}
-{%- if field.value -%}
-(int) ({{field.value|expression_to_text('i32')}})
-{%- elif index == 0 -%}
-0
-{%- else -%}
-{{enum.fields[index - 1]|name}} + 1
-{%- endif -%}
-{%- endmacro -%}
-
-{%- macro enum_def(enum, top_level) -%}
-public {{ 'static ' if not top_level }}final class {{enum|name}} {
-
-{% for field in enum.fields %}
- public static final int {{field|name}} = {{enum_value(enum, field, loop.index0)}};
-{% endfor %}
-
- private {{enum|name}}() {}
-
-}
-{%- endmacro -%}

Powered by Google App Engine
This is Rietveld 408576698