202608271420
This commit is contained in:
1 parent
7a55472569
commit
4ff6470cc6
1 file changed
+3
-3
+3
-3
@@ -154,7 +154,7 @@ r8asm::ast_node r8asm::ast::expand_node_to_ins(const ast_node &node) {
|
||||
} break;
|
||||
|
||||
case ast_node_t::BUILTIN: {
|
||||
switch (builtin_map.at(node.value)) {
|
||||
switch (builtin_map.at("builtin_" + node.value)) {
|
||||
// WARNING: node.value HAS BEEN USED!!! DO NOT CONSUME IT AGAIN!!!
|
||||
case builtin_t::ANCHOR: {
|
||||
/*
|
||||
@@ -366,7 +366,7 @@ r8asm::ast_node r8asm::parse(const token_stream &stream) {
|
||||
0 1 2 3
|
||||
*/
|
||||
to_return.children.push_back(
|
||||
{r8asm::ast_node_t::BUILTIN, it->tokens[1].value, {}});
|
||||
{r8asm::ast_node_t::BUILTIN, "builtin_" + it->tokens[1].value, {}});
|
||||
// build subtree for argument(s) of builtin
|
||||
token_line buffer = {it->number, {}};
|
||||
for (auto token_it = it->tokens.begin() + 2; // where argument begins
|
||||
@@ -406,7 +406,7 @@ r8asm::ast_node r8asm::parse(const token_stream &stream) {
|
||||
} break;
|
||||
case token_t::ROT8: {
|
||||
to_return.children.push_back(
|
||||
{r8asm::ast_node_t::ROT8, it->tokens[0].value, {}});
|
||||
{r8asm::ast_node_t::ROT8, "rot8_" + it->tokens[0].value, {}});
|
||||
} break;
|
||||
case token_t::PREFIX_REMARK:
|
||||
// ignore it.
|
||||
|
||||
Reference in new issue
Block a user