add ret void pour func void

This commit is contained in:
Vu Tuan Minh
2025-04-30 09:38:30 +02:00
parent 0e82527b4b
commit 20f6170168
11 changed files with 31 additions and 40 deletions

View File

@@ -1,23 +1 @@
FUNC INT test1(a,b){
a := a+b
}
FUNC INT test2(a,b){
IF a
THEN
RETURN a
FI
}
FUNC INT test3(a,b){
IF a
THEN
RETURN a
ELSE
RETURN b
FI
}
FUNC INT main(x,y) {
x := test1(x,y)
}
FUNC VOID main() PRINT 1

BIN
tests/fragment1/hello_world Executable file

Binary file not shown.

BIN
tests/fragment1/print1 Executable file

Binary file not shown.

BIN
tests/fragment1/print2 Executable file

Binary file not shown.

BIN
tests/fragment1/print3 Executable file

Binary file not shown.

BIN
tests/fragment1/print4 Executable file

Binary file not shown.

BIN
tests/fragment1/sequence Executable file

Binary file not shown.

BIN
tests/fragment2/call Executable file

Binary file not shown.