OLD | NEW |
---|---|
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 {%- macro enum_values(enum) -%} | 5 {%- macro enum_values(enum) -%} |
6 [ | 6 [ |
7 {% for field in enum.fields %} | 7 {% for field in enum.fields %} |
8 ('{{field.name}}', {{field.resolved_value}}), | 8 ('{{field.name}}', {{field.resolved_value}}), |
9 {% endfor %} | 9 {% endfor %} |
10 ] | 10 ] |
(...skipping 19 matching lines...) Expand all Loading... | |
30 'fields': [ | 30 'fields': [ |
31 {% for byte in struct.bytes %} | 31 {% for byte in struct.bytes %} |
32 {% if byte.packed_fields %} | 32 {% if byte.packed_fields %} |
33 {{byte|field_group}}, | 33 {{byte|field_group}}, |
34 {% endif %} | 34 {% endif %} |
35 {% endfor %} | 35 {% endfor %} |
36 ], | 36 ], |
37 {% endif %} | 37 {% endif %} |
38 } | 38 } |
39 {%- endmacro -%} | 39 {%- endmacro -%} |
40 | |
41 {%- macro union_descriptor(union) -%} | |
42 { | |
43 'fields': [ | |
44 {% for field in union.fields %} | |
45 {{field|union_field_descriptor}}, | |
qsr
2015/07/17 10:53:58
Alignemtn is still wrong. The issue was with the f
azani
2015/07/17 20:38:16
Thanks for the clarification.
| |
46 {% endfor %} | |
47 ], | |
48 } | |
49 {%- endmacro -%} | |
OLD | NEW |