| Index: mojo/public/bindings/generators/js_templates/module.js.tmpl
|
| diff --git a/mojo/public/bindings/generators/js_templates/module.js.tmpl b/mojo/public/bindings/generators/js_templates/module.js.tmpl
|
| index 7483b88181946a9a5a84c7782312129a36417301..ea0391d274fdd207cfaafbf6e8a8fa8ad0d80425 100644
|
| --- a/mojo/public/bindings/generators/js_templates/module.js.tmpl
|
| +++ b/mojo/public/bindings/generators/js_templates/module.js.tmpl
|
| @@ -8,21 +8,13 @@ define([
|
| ], function(core, codec) {
|
|
|
| {#--- Enums #}
|
| +{%- from "enum_definition.tmpl" import enum_def -%}
|
| {% for enum in enums %}
|
| - var {{enum.name}} = {
|
| -{%- set next_value = 0 %}
|
| -{%- for field in enum.fields %}
|
| -{%- if field.value %}
|
| -{%- set next_value = field.value|int %}
|
| -{%- endif %}
|
| - {{field.name}}: {{next_value}},
|
| -{%- set next_value = next_value + 1 %}
|
| -{%- endfor %}
|
| - };
|
| -{% endfor %}
|
| +{{ enum_def("var %s"|format(enum.name), enum) }}
|
| +{%- endfor %}
|
|
|
| {#--- Struct definitions #}
|
| -{%- for struct in structs %}
|
| +{% for struct in structs %}
|
| {% include "struct_definition.tmpl" %}
|
| {%- endfor %}
|
|
|
|
|