{% macro process(index, depth, parent) %} {% set local_id = parent ~ "@" ~ index %} {% if instructions[index].action.type == "Combine" %} {% for value in values[index] %} {{ value|bits }} {% endfor %} {% for source in instructions[index].values %} {{ self::process(index=source, depth = depth + 1, parent = local_id) }} {% endfor %} {% elif instructions[index].action.type == "Node" %} {{ instructions[index].action.value }} {% for value in values[index] %} {{ value|bits }} {% endfor %} {% for source in instructions[index].values %} {{ self::process(index=source, depth = depth + 1,parent = local_id) }} {% endfor %} {% elif instructions[index].action.type == "Module" %} {{ instructions[index].action.value }} {% for value in values[index] %} {{ value|bits }} {% endfor %} {% for source in instructions[index].values %} {{ self::process(index=source, depth = depth + 1,parent = local_id) }} {% endfor %} {% elif instructions[index].action.type == "Sequence" %} {{ instructions[index].action.value }} {% for value in values[index] %} {{ value|bits }} {% endfor %} {% endif %} {% endmacro %}