Commit 0d9b462b authored by Giovanni Ortuño Urquidi's avatar Giovanni Ortuño Urquidi Committed by Commit Bot

mojo-js: Add support for nested enums in interfaces

We weren't generated enum definitions for nested enums in interfaces.

Change-Id: Ib303509dd991f0555ceb4e092ce41a4da91d3640
Reviewed-on: https://chromium-review.googlesource.com/c/1350440Reviewed-by: default avatarKen Rockot <rockot@google.com>
Commit-Queue: Giovanni Ortuño Urquidi <ortuno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#610957}
parent 53c85af9
...@@ -142,6 +142,12 @@ class {{interface.name}} { ...@@ -142,6 +142,12 @@ class {{interface.name}} {
} }
} }
{#--- Enums #}
{% from "lite/enum_definition.tmpl" import enum_def %}
{%- for enum in interface.enums %}
{{ enum_def("%s.%s"|format(interface.name, enum.name), enum) }}
{%- endfor %}
/** @const {!string} */ /** @const {!string} */
{{interface.name}}.$interfaceName = '{{mojom_namespace}}.{{interface.name}}'; {{interface.name}}.$interfaceName = '{{mojom_namespace}}.{{interface.name}}';
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment