202608252348

This commit is contained in:
starcells committed 2026-08-25 23:48:59 +08:00
1 parent 0c6b494f22
commit ef7a8f9d6c
2 files changed
+11

No files matched your search

+1
View File
@@ -23,6 +23,7 @@ public:
OPERATOR,
BUILTIN,
MACROCALL,
REPEAT,
ROT8,
CODEBLOCK,
};
+10
View File
@@ -85,6 +85,16 @@ r8asm::ast::expand_node_to_ins(const ast_node &node) {
if (node.value == "btp")
dataptr--;
} break;
case ast_node_t::REPEAT: {
/*
REPEAT
children[0]: count
children[1]: codeblock
*/
for (data count = expand_node_to_data(node.children[0]); count > 0; count--)
for (const auto &i : expand_node_to_ins(node.children[1]))
to_return.push_back(i);
}
case ast_node_t::MACROCALL: {
/*
MACROCALL