Implement simple if conditions
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
var x;
|
||||
var x: Int;
|
||||
begin
|
||||
x := 5;
|
||||
! x
|
||||
|
1
tests/expectations/if_condition.txt
Normal file
1
tests/expectations/if_condition.txt
Normal file
@ -0,0 +1 @@
|
||||
8
|
2
tests/expectations/print_boolean.txt
Normal file
2
tests/expectations/print_boolean.txt
Normal file
@ -0,0 +1,2 @@
|
||||
1
|
||||
0
|
9
tests/if_condition.eln
Normal file
9
tests/if_condition.eln
Normal file
@ -0,0 +1,9 @@
|
||||
begin
|
||||
if True then ! 8;
|
||||
if False then
|
||||
begin
|
||||
! 5;
|
||||
! 5;
|
||||
! 5
|
||||
end
|
||||
end.
|
4
tests/print_boolean.eln
Normal file
4
tests/print_boolean.eln
Normal file
@ -0,0 +1,4 @@
|
||||
begin
|
||||
? True;
|
||||
? False
|
||||
end.
|
Reference in New Issue
Block a user