OLD | NEW |
---|---|
1 {% macro v8_value_to_local_cpp_value(thing) %} | 1 {% macro v8_value_to_local_cpp_value(thing) %} |
2 {# This indirection is just to avoid spurious white-space lines. #} | 2 {# This indirection is just to avoid spurious white-space lines. #} |
3 {{generate_v8_value_to_local_cpp_value(thing) | trim}} | 3 {{generate_v8_value_to_local_cpp_value(thing) | trim}} |
4 {%- endmacro %} | 4 {%- endmacro %} |
5 | 5 |
6 | 6 |
7 {% macro generate_v8_value_to_local_cpp_value(thing) %} | 7 {% macro generate_v8_value_to_local_cpp_value(thing) %} |
8 {% set item = thing.v8_value_to_local_cpp_value or thing %} | 8 {% set item = thing.v8_value_to_local_cpp_value or thing %} |
9 {% if item.error_message %} | 9 {% if item.error_message %} |
10 /* {{item.error_message}} */ | 10 /* {{item.error_message}} */ |
(...skipping 11 matching lines...) Expand all Loading... | |
22 {% endif %}{# item.declare_variable #} | 22 {% endif %}{# item.declare_variable #} |
23 {% if item.set_expression %} | 23 {% if item.set_expression %} |
24 {{item.set_expression}}; | 24 {{item.set_expression}}; |
25 {% endif %} | 25 {% endif %} |
26 {% if item.check_expression %} | 26 {% if item.check_expression %} |
27 if ({{item.check_expression}}) | 27 if ({{item.check_expression}}) |
28 return{% if item.return_expression %} {{item.return_expression}}{% endif %}; | 28 return{% if item.return_expression %} {{item.return_expression}}{% endif %}; |
29 {% endif %}{# item.check_expression #} | 29 {% endif %}{# item.check_expression #} |
30 {% endif %}{# item.error_message #} | 30 {% endif %}{# item.error_message #} |
31 {% endmacro %} | 31 {% endmacro %} |
32 | |
33 | |
34 {% macro declare_enum_validation_variable(enum_values) %} | |
35 const char* validValues[] = { | |
haraken
2015/03/31 06:11:16
Add static?
bashi
2015/04/01 00:17:31
Done.
| |
36 {% for enum_value in enum_values %} | |
37 "{{enum_value}}", | |
38 {% endfor %} | |
39 }; | |
40 {%-endmacro %} | |
OLD | NEW |