Extract preprocessing from tokenizer

This commit is contained in:
2020-08-29 11:25:10 +02:00
parent aebc1dd86d
commit 71678b2ec6
12 changed files with 254 additions and 134 deletions

View File

@@ -1,4 +1,4 @@
#DEFINE
#DEFINE LETTER_O 'o'
addi $10 $-5 %A;
subi %A $2 %B;
@@ -31,7 +31,7 @@ int PRINT_CHAR;
seti %A $108; # l
int PRINT_CHAR;
int PRINT_CHAR;
seti %A $111; # o
seti %A LETTER_O;
int PRINT_CHAR;
seti %A $32; # space
@@ -105,9 +105,6 @@ seti %B $10;
int $5;
int $3;
# Demonstrate string literals
"Hello world!";
exit;
noop_function: