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

Unified Diff: mojo/public/tools/bindings/generators/go_templates/enum.tmpl

Issue 2250183003: Make the fuchsia mojo/public repo the source of truth. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 4 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/go_templates/enum.tmpl
diff --git a/mojo/public/tools/bindings/generators/go_templates/enum.tmpl b/mojo/public/tools/bindings/generators/go_templates/enum.tmpl
deleted file mode 100644
index 15432bd5ababb84c6c7d908a34bf4a583a736f62..0000000000000000000000000000000000000000
--- a/mojo/public/tools/bindings/generators/go_templates/enum.tmpl
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-{% import "runtime_type_macros.tmpl" as runtime_type_macros %}
-
-{% macro define(enum, typepkg, package) %}
-type {{enum|name}} int32
-
-const (
-{% for field in enum.fields %}
-{% if loop.first %}
-{% if field.value %}
- {{enum|name}}_{{field|name}} {{enum|name}} = {{field.value|expression_to_text}}
-{% else %}
- {{enum|name}}_{{field|name}} {{enum|name}} = 0
-{% endif %}
-{% elif field.value %}
- {{enum|name}}_{{field|name}} = {{field.value|expression_to_text}}
-{% else %}
- {{enum|name}}_{{field|name}} = {{enum|name}}_{{enum.fields[loop.index0 - 1]|name}} + 1;
-{% endif%}
-{% endfor %}
-)
-
-{%- set type_name = enum|name(exported) %}
-{{runtime_type_macros.maybeWriteStaticMojomTypeAccessor(typepkg, enum)}}
-{{runtime_type_macros.maybeWriteMojomTypeAccessor(typepkg, enum,type_name)}}
-
-{% endmacro %}

Powered by Google App Engine
This is Rietveld 408576698