projects
/
platform
/
framework
/
web
/
crosswalk.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Upstream version 5.34.92.0
[platform/framework/web/crosswalk.git]
/
src
/
mojo
/
public
/
bindings
/
generators
/
js_templates
/
enum_definition.tmpl
1
{%- macro enum_def(enum_init, enum) %}
2
{{enum_init}} = {
3
{%- set next_value = 0 %}
4
{%- for field in enum.fields %}
5
{%- if field.value %}
6
{%- set next_value = field.value|int %}
7
{%- endif %}
8
{{field.name}}: {{next_value}},
9
{%- set next_value = next_value + 1 %}
10
{%- endfor %}
11
};
12
{%- endmacro %}