This commit is contained in:
Aer Iz 2024-02-13 18:10:08 +02:00
parent 5e15a3b3e0
commit 7a781b0849
2 changed files with 23 additions and 5 deletions

View File

@ -27,11 +27,11 @@ typedef enum
static void prefix_operator(Stack *stack, char op) static void prefix_operator(Stack *stack, char op)
{ {
// if (NAME[0] != '@' && (NAME[1] == '\0' || NAME[1] == '\n')) if (NAME[0] != '@' && (NAME[1] == '\0' || NAME[1] == '\n'))
// { {
// printf("%c\n", op); printf("%c\n", op);
// kms(stack, "Invalid usage of prefix operators"); kms(stack, "Invalid usage of prefix operators");
// } }
switch (op) switch (op)
{ {

18
tests/test.lb Normal file
View File

@ -0,0 +1,18 @@
; Лабашки ооп
@ 4441 ; Класс
@ 4442 ; Поле + сеттер
|field
|jmp 0
@ 4443 ; Поле + сеттер
|field
|jmp 0
@ 44411 ; Метод
push 444111 ; Метка для возвращения
push 2
jmp 4442
@ 444111 ; ^^^