diff options
author | A404M <ahmadmahmoudiprogrammer@gmail.com> | 2025-01-28 03:40:39 +0330 |
---|---|---|
committer | A404M <ahmadmahmoudiprogrammer@gmail.com> | 2025-01-28 03:44:01 +0330 |
commit | 5adca3ef1277b9e7f8f4d77e1b2ecce9ad78d76b (patch) | |
tree | 1abc6fe5850b90b6c3956538e8be93ce1ebdb672 /src/compiler/code-generator.c | |
parent | aa69d90b4f0d8bb0d320c245ebf9b47741f655fe (diff) |
clean syntax to not allowing variable definition else where
Diffstat (limited to 'src/compiler/code-generator.c')
-rw-r--r-- | src/compiler/code-generator.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/code-generator.c b/src/compiler/code-generator.c index 61d0092..342c790 100644 --- a/src/compiler/code-generator.c +++ b/src/compiler/code-generator.c @@ -77,6 +77,7 @@ CodeGeneratorCodes *codeGenerator(AstTreeRoot *astTreeRoot) { return NULL; } continue; + case AST_TREE_TOKEN_TYPE_TYPE: case AST_TREE_TOKEN_TYPE_FUNCTION: case AST_TREE_TOKEN_TYPE_VOID: case AST_TREE_TOKEN_VALUE_U64: @@ -84,7 +85,6 @@ CodeGeneratorCodes *codeGenerator(AstTreeRoot *astTreeRoot) { case AST_TREE_TOKEN_KEYWORD_PRINT_U64: case AST_TREE_TOKEN_FUNCTION_CALL: case AST_TREE_TOKEN_TYPE_U64: - case AST_TREE_TOKEN_VARIABLE_DEFINE: case AST_TREE_TOKEN_NONE: break; } @@ -148,10 +148,10 @@ bool codeGeneratorAstTreeFunction(char *label_begin, char *label_end, case AST_TREE_TOKEN_VALUE_U64: case AST_TREE_TOKEN_VARIABLE: case AST_TREE_TOKEN_FUNCTION: + case AST_TREE_TOKEN_TYPE_TYPE: case AST_TREE_TOKEN_TYPE_FUNCTION: case AST_TREE_TOKEN_TYPE_VOID: case AST_TREE_TOKEN_TYPE_U64: - case AST_TREE_TOKEN_VARIABLE_DEFINE: case AST_TREE_TOKEN_NONE: } printLog("Bad token %d", tree.token); |