File tree Expand file tree Collapse file tree 2 files changed +53
-0
lines changed Expand file tree Collapse file tree 2 files changed +53
-0
lines changed Original file line number Diff line number Diff line change 1+ {% for block in blocks %}
2+ begin {{ block.name }} {{ block.index }}
3+ {% for var in block %}
4+ {% if var .kind in ['keyword' , 'integer' , 'double precision' ] %}
5+ {{ macros.scalar(var) }}
6+ {% elif var .kind == 'keystring' %}
7+ {{ macros.union(var) }}
8+ {% elif var .kind == 'record' %}
9+ {{ macros.record(var) }}
10+ {% elif var .kind == 'array' %}
11+ {{ macros.array(var) }}
12+ {% elif var .kind == 'list' %}
13+ {{ macros.list(var) }}
14+ {% endif %}
15+ {% endfor %}
16+ end {{ block.name }}
17+ {% endfor %}
Original file line number Diff line number Diff line change 1+ {% macro scalar (var ) %}
2+ {{ var.name }} {% endif %} {{ var.value }}
3+ {% endmacro %}
4+
5+ {% macro union (var ) %}
6+ {% endmacro %}
7+
8+ {% macro record (var ) %}
9+ {% if var .tagged %} {{ var.name }} {% endif %} {{ var.value|join(' ') }}
10+ {% endmacro %}
11+
12+ {% macro array (var ) %}
13+ {% if constant %}{% if layered %}
14+ {# layered constant #}
15+ {{ var.name }} LAYERED
16+ {% for val in var .value %}
17+ CONSTANT
18+ {% endfor %}
19+ {% else %}
20+ {# constant #}
21+ {{ var.name }} CONSTANT {{ var.value }}
22+ {% endif %}
23+ {% else %}
24+ {# layered #}
25+ {% if layered %}
26+ {{ var.name }}
27+ {% for val in var .value %} {{ val }}{% endfor %}
28+ {% else %}
29+ {# grid-shaped #}
30+ {{ var.name }} {{ var.value }}
31+ {% endif %}
32+ {% endif %}
33+ {% endmacro %}
34+
35+ {% macro list (var ) %}
36+ {% endmacro %}
You can’t perform that action at this time.
0 commit comments