diff --git a/tests/output/inp_break.c_asm_output.asm b/tests/output/inp_break.c_asm_output.asm index de83a50..d5b100d 100644 --- a/tests/output/inp_break.c_asm_output.asm +++ b/tests/output/inp_break.c_asm_output.asm @@ -45,7 +45,7 @@ mov [rbp-48], rax call printf jmp __tmp_label_1 __tmp_label_4: -jmp __tmp_label_1 +jmp __tmp_label_0 jmp __tmp_label_0 __tmp_label_1: ; exit loop @@ -94,7 +94,6 @@ mov rax, rbp sub rax, 8 mov [rbp-80], rax call printf -jmp __tmp_label_6 __tmp_label_11: mov rax, rbp sub rax, 16 @@ -143,9 +142,9 @@ mov rax, rbp sub rax, 16 mov [rbp-24], rax mov rax, [rbp-16] -mov rbx, 0 +mov rbx, 10 cmp rax, rbx -jge __tmp_label_17 +jle __tmp_label_17 mov rax, 0 jmp __tmp_label_18 __tmp_label_17: @@ -234,7 +233,6 @@ mov [rbx], rax jmp __tmp_label_19 __tmp_label_20: ; exit loop -jmp __tmp_label_16 mov rax, rbp sub rax, 16 mov [rbp-48], rax diff --git a/tests/output/inp_break.c_lex_output.txt b/tests/output/inp_break.c_lex_output.txt index d41d5fe..237b2c8 100644 --- a/tests/output/inp_break.c_lex_output.txt +++ b/tests/output/inp_break.c_lex_output.txt @@ -35,10 +35,10 @@ TKN_LIT_STR(i is 0 ) TKN_R_PAREN TKN_SEMICOLON -TKN_CONTINUE +TKN_BREAK TKN_SEMICOLON TKN_R_BRACE -TKN_BREAK +TKN_CONTINUE TKN_SEMICOLON TKN_R_BRACE TKN_FOR @@ -72,8 +72,6 @@ TKN_LIT_STR(i is 0 ) TKN_R_PAREN TKN_SEMICOLON -TKN_CONTINUE -TKN_SEMICOLON TKN_R_BRACE TKN_IF TKN_L_PAREN @@ -94,8 +92,8 @@ TKN_ASSIGN TKN_LIT_INT(0) TKN_SEMICOLON TKN_ID(i) -TKN_GTE -TKN_LIT_INT(0) +TKN_LTE +TKN_LIT_INT(10) TKN_SEMICOLON TKN_ID(i) TKN_ASSIGN @@ -146,8 +144,6 @@ TKN_BREAK TKN_SEMICOLON TKN_R_BRACE TKN_R_BRACE -TKN_BREAK -TKN_SEMICOLON TKN_R_BRACE TKN_RETURN TKN_LIT_INT(0) diff --git a/tests/output/inp_break.c_prep_output.txt b/tests/output/inp_break.c_prep_output.txt index d41d5fe..237b2c8 100644 --- a/tests/output/inp_break.c_prep_output.txt +++ b/tests/output/inp_break.c_prep_output.txt @@ -35,10 +35,10 @@ TKN_LIT_STR(i is 0 ) TKN_R_PAREN TKN_SEMICOLON -TKN_CONTINUE +TKN_BREAK TKN_SEMICOLON TKN_R_BRACE -TKN_BREAK +TKN_CONTINUE TKN_SEMICOLON TKN_R_BRACE TKN_FOR @@ -72,8 +72,6 @@ TKN_LIT_STR(i is 0 ) TKN_R_PAREN TKN_SEMICOLON -TKN_CONTINUE -TKN_SEMICOLON TKN_R_BRACE TKN_IF TKN_L_PAREN @@ -94,8 +92,8 @@ TKN_ASSIGN TKN_LIT_INT(0) TKN_SEMICOLON TKN_ID(i) -TKN_GTE -TKN_LIT_INT(0) +TKN_LTE +TKN_LIT_INT(10) TKN_SEMICOLON TKN_ID(i) TKN_ASSIGN @@ -146,8 +144,6 @@ TKN_BREAK TKN_SEMICOLON TKN_R_BRACE TKN_R_BRACE -TKN_BREAK -TKN_SEMICOLON TKN_R_BRACE TKN_RETURN TKN_LIT_INT(0) diff --git a/tests/output/inp_break.c_tree_output.txt b/tests/output/inp_break.c_tree_output.txt index 4e6c579..38e98b1 100644 --- a/tests/output/inp_break.c_tree_output.txt +++ b/tests/output/inp_break.c_tree_output.txt @@ -44,7 +44,7 @@ Program( Literal(Type: 33, Value: i is 0 ) Break - Break + Continue For( Init: VarDecl(i): @@ -85,7 +85,6 @@ Program( Args: Literal(Type: 33, Value: i is 0 ) - Break If( Cond: BinaryOp(Op: 65) @@ -104,11 +103,11 @@ Program( Value: Literal(Type: 34, Value: 0) Cond: - BinaryOp(Op: 69) + BinaryOp(Op: 68) Left: Variable(i) Right: - Literal(Type: 34, Value: 0) + Literal(Type: 34, Value: 10) Act: BinaryOp(Op: 64) Left: @@ -164,7 +163,6 @@ Program( Body: CompoundStatement Break - Break Return: Literal(Type: 34, Value: 0) )