Merge branch 'anri' of gaufre.informatique.univ-paris-diderot.fr:Anri/compilation-m1-2023 into anri

This commit is contained in:
Nicolas PENELOUX 2023-10-24 21:22:14 +02:00
commit 6019b902e1

View file

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