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

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

Issue 1433183002: Generate Mojom Types for Dart (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Simplify identifier_store for Go and Dart Created 5 years, 1 month 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/mojom_type_macros.tmpl
diff --git a/mojo/public/tools/bindings/generators/go_templates/mojom_type_macros.tmpl b/mojo/public/tools/bindings/generators/go_templates/mojom_type_macros.tmpl
index bad74532586bb8730a58baa0c47e222da16cd1e5..4eaa656eeb5fdcfb01f0f42830591deccc5b4bcd 100644
--- a/mojo/public/tools/bindings/generators/go_templates/mojom_type_macros.tmpl
+++ b/mojo/public/tools/bindings/generators/go_templates/mojom_type_macros.tmpl
@@ -3,10 +3,6 @@
// found in the LICENSE file.
{%- macro writeMojomType(typepkg, type, pkg, exported=true, topLevel=true) -%}
-{%- if type|identifier|identifier_check('WriteMojomType') -%} {#- Already printed out -#}
-{{writeTypeTypeReference(typepkg, type, pkg)}}
-{%- else -%}
-
{%- if type|mojom_type(typepkg) != "" -%}{#- simple kind case -#}
&{{type|mojom_type(typepkg)}}
{%- elif type|is_array -%}
@@ -15,7 +11,6 @@
&{{writeTypeMapType(typepkg, type, pkg, exported)}}
{%- elif type|is_enum or type|is_struct or type|is_union -%}
{%- if topLevel -%}
- {{- type|identifier|identifier_store('WriteMojomType') -}}
{%- if type|is_enum -%}
{{writeMojomEnumType(typepkg, type, pkg, exported)}}
{%- elif type|is_struct -%}
@@ -27,12 +22,10 @@
{{writeTypeTypeReference(typepkg, type, pkg)}}
{%- endif -%}
{%- elif type|is_interface or type|is_interface_request -%}
- {{- type|identifier|identifier_store('WriteMojomType') -}}
{{writeTypeTypeReference(typepkg, type, pkg)}}
{%- else -%}
ERROR: UNSUPPORTED TYPE
{%- endif -%}
-{%- endif -%}
{%- endmacro -%}
{%- macro writeTypeTypeReference(typepkg, type, pkg) -%}

Powered by Google App Engine
This is Rietveld 408576698