Stick names in own config list

This commit is contained in:
Raphael Coeffic
2021-11-10 11:07:00 +01:00
parent 21bf580f9a
commit 77ff579355
21 changed files with 79 additions and 17 deletions
+2
View File
@@ -342,6 +342,8 @@ def parse_field_array(f, node):
for a in ann:
if a['type'] == 'idx':
use_idx = True
elif a['type'] == 'raw':
f.raw = a['val']
# let's see first if it's some kind of struct/union/enum
elmt_st = parse_node(RootAST, elmt_decl)
+3 -1
View File
@@ -45,8 +45,10 @@ static const struct YamlNode {{ struct.name }}[] = {
YAML_UNION("{{ max_len(elmt.name) }}", {{elmt.bits}}, {{elmt.var_type}}_elmts, {{ elmt.func}}),
{% elif elmt.type == 'array' %}
YAML_ARRAY("{{ max_len(elmt.name) }}", {{elmt.bits // elmt.length}}, {{elmt.length}}, {{elmt.var_type}}, {{ elmt.func }}),
{% elif elmt.raw %}
{{ elmt.raw }},
{% else %}
// name='{{elmt.name}}', type='{{elmt.type}}', bits='{{elmt.bits}}', is_array='{{elmt.is_array}}', var_type='{{elmt.var_type}}', kind='{{elmt.cursor.kind}}' , type.kind='{{elmt.cursor.type.kind}}'
// name='{{elmt.name}}', type='{{elmt.type}}', bits='{{elmt.bits}}', is_array='{{elmt.is_array}}', var_type='{{elmt.var_type}}', kind='{{elmt.cursor.kind}}' , type.kind='{{elmt.cursor.type.kind}}', raw='{{elmt.raw}}'
{% endif %}
{% endfor %}
YAML_END