Minor changes, still WIP...

This commit is contained in:
Ognjen Milan Robovic 2024-04-02 18:24:35 -04:00
parent f7754b4753
commit b2d0cb93e2
2 changed files with 5 additions and 2 deletions

2
test.x
View File

@ -36,7 +36,7 @@ main () > integer:
else else
echo ("fuck formatting..."); echo ("fuck formatting...");
echo ("\n");; echo ("\n");;
return (0);; return 0;;
heyo () echo ("Heyo!"); heyo () echo ("Heyo!");
cyaa () echo ("Heyo!"); cyaa () echo ("Heyo!");

View File

@ -186,6 +186,9 @@ int main (void) {
} else if ((token_type [length] == core_symbol) && (symbol_data [token_data [length]] == ';')) { } else if ((token_type [length] == core_symbol) && (symbol_data [token_data [length]] == ';')) {
echo ("; return;\nxor rax, rax\nret\n"); echo ("; return;\nxor rax, rax\nret\n");
++length; ++length;
} else if (token_type [length] == core_number && (token_type [length + 1] == core_symbol) && (symbol_data [token_data [length + 1]] == ';')) {
printf ("; return {number};\nmov rax, %i\nret\n", number_data [token_data [length]]);
++length;
} else { } else {
kill ("return ?\n"); kill ("return ?\n");
} }
@ -206,7 +209,7 @@ int main (void) {
echo ("else if\n"); echo ("else if\n");
++length; ++length;
} else { } else {
echo ("expression\n"); echo ("else expression\n");
} }
} else if ((token_type [length] == core_word) && (token_data [length] == word_type)) { } else if ((token_type [length] == core_word) && (token_data [length] == word_type)) {
++length; ++length;