This commit is contained in:
Mylloon 2023-10-24 20:25:22 +02:00
parent f8d9068012
commit d9fd965b3b
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -103,7 +103,6 @@ tdefinition:
} }
list_constructor_and_their_ty: list_constructor_and_their_ty:
// TODO: C'est pas sensé être en option list_ty ici?
| c=located(constructor) t=optionlist(list_ty) { | c=located(constructor) t=optionlist(list_ty) {
(c, t) (c, t)
} }
@ -168,11 +167,11 @@ simple_pattern:
} }
/* N-uplets ou parenthésage */ /* N-uplets ou parenthésage */
| LPAREN RPAREN { | LPAREN RPAREN {
PTuple([]) PTuple([])
} }
| l=pattern_list { | l=pattern_list {
match l with | [alone] -> Position.value alone | _ -> PTuple(l) match l with | [alone] -> Position.value alone | _ -> PTuple(l)
} }
/* Annotation de type */ /* Annotation de type */
@ -346,7 +345,7 @@ expression:
Define(vd, e) Define(vd, e)
} }
/* Fonction anonyme */ /* Fonction anonyme */
| BACKSLASH p=located(pattern) ARROW e=located(expression){ | BACKSLASH p=located(pattern) ARROW e=located(expression) {
Fun(FunctionDefinition(p, e)) Fun(FunctionDefinition(p, e))
} }
/* Application */ /* Application */