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
echo ("fuck formatting...");
echo ("\n");;
return (0);;
return 0;;
heyo () 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]] == ';')) {
echo ("; return;\nxor rax, rax\nret\n");
++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 {
kill ("return ?\n");
}
@ -206,7 +209,7 @@ int main (void) {
echo ("else if\n");
++length;
} else {
echo ("expression\n");
echo ("else expression\n");
}
} else if ((token_type [length] == core_word) && (token_data [length] == word_type)) {
++length;