This commit is contained in:
Mylloon 2023-10-20 19:06:08 +02:00
parent aa5009e94c
commit 7683cada98
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -60,7 +60,9 @@ tdefinition:
}
label_with_type:
| l=located(label) COLON t=located(ty) { l, t }
| l=located(label) COLON t=located(ty) {
l, t
}
vdefinition:
@ -345,8 +347,7 @@ simple_expression:
/* Match (exp) {| ...| ... | ...} */
| MATCH LPAREN e=located(expression) RPAREN
LBRACE b=branches RBRACE {
| MATCH LPAREN e=located(expression) RPAREN LBRACE b=branches RBRACE {
Case(e, b)
}
@ -391,8 +392,9 @@ simple_expression:
/* for x in (e1 to e2) { expr } */
| FOR x=located(identifier)
FROM LPAREN e1=located(expression) RPAREN TO LPAREN e2=located(expression) RPAREN
LBRACE e3=located(expression) RBRACE
{ For(x,e1,e2,e3)}
LBRACE e3=located(expression) RBRACE {
For(x, e1, e2, e3)
}
/* Parenthésage pas sûr mais je vois pas sinon*/
| LPAREN e=expression RPAREN {