return 0 à la fin, suppression du typeFunction dans la symTable, Appeal renomé en Call

This commit is contained in:
Rochas
2025-04-29 23:25:07 +02:00
parent 7e9b49b08a
commit d238ac0887
9 changed files with 67 additions and 108 deletions

View File

@@ -1,58 +1,23 @@
PROTO INT add(x,y)
FUNC INT test1(a,b){
a := a+b
}
FUNC INT add(x,y,z) {
INT z,a,b,c
y := x+y
RETURN z
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) {
INT a,b,c,minh
x := 5
minh := x * y
b:=3
c:=1
PRINT "coucou, tu peux réparer le visitPrint dans LLVM stp","il manque virgule au milieu", c*5+b
WHILE b - 1
DO{
b := b - 1
c := c + 1
WHILE b -1
DO{
b:= b - 1
c:= c + 1
WHILE b -1
DO{
b:= b - 1
c:= c + 1
}
DONE
}
DONE
}
DONE
WHILE b - 1
DO{
b := b - 1
c := c + 1
WHILE b -1
DO{
b:= b - 1
c:= c + 1
WHILE b -1
DO{
b:= b - 1
c:= c + 1
}
DONE
}
DONE
}
DONE
IF c -1
THEN READ a ELSE READ b
FI
b:=c+1
RETURN 4 + 6 * 5 + 2 }
PROTO INT type(x,y)
x := test1(x,y)
}