conflits?

This commit is contained in:
Mylloon 2023-10-21 00:36:46 +02:00
parent 8ed2b0c51f
commit 5692c73984
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -55,7 +55,7 @@ tdefinition:
/* la définition étant assez compliqué, on va utilisé d'autre terme pour réduire la taille */
| option(PIPE) l=separated_nonempty_list(PIPE,list_constructor_and_ty) {
DefineSumType(l)
}
}
/* Type produit étiqueté */
| LBRACE lt=separated_nonempty_list(COMMA, label_with_type) RBRACE {
DefineRecordType(lt)
@ -354,41 +354,17 @@ expression:
Apply(e1, e2)
}
<<<<<<< HEAD
=======
/* TODO operation binaire mais j'ai pas très bien compris encore */
>>>>>>> 726daf228d20fae695ecf903491c8b62d9e6a673
/* Match (exp) {| ...| ... | ...} */
| MATCH LPAREN e=located(expression) RPAREN LBRACE b=branches RBRACE {
Case(e, b)
}
<<<<<<< HEAD
/* TODO if ( exp ) then { expr } j'ai RIEN COMPRIS */
/*
| IF LPAREN e=located(expression) RPAREN
THEN LBRACE e2=located(expression) RBRACE{
IfThenElse(e,e2,Position.unknown_pos )
}
*/
/* if ( expr ) then { expr } else { expr } */
| IF LPAREN e=located(expression) RPAREN
THEN LBRACE e2=located(expression) RBRACE
ELSE LBRACE e3=located(expression) RBRACE {
IfThenElse(e,e2,e3)
}
/* Reference ref expr */
=======
/* TODO if ( exp ) then { expr } j'ai RIEN COMPRIS */
/* | IF LPAREN e=located(expression) RPAREN
THEN LBRACE e2=located(expression) RBRACE {
IfThenElse(e, e2, None)
} */
>>>>>>> 726daf228d20fae695ecf903491c8b62d9e6a673
/* if ( expr ) then { expr } else { expr } */
| IF LPAREN e=located(expression) RPAREN
@ -419,7 +395,7 @@ expression:
* do { expr } until ( expr ) */
/* TODO */
/* boucle for
/* Boucle for
* for x in (e1 to e2) { expr } */
| FOR x=located(identifier)
FROM LPAREN e1=located(expression) RPAREN TO LPAREN e2=located(expression) RPAREN
@ -432,30 +408,17 @@ expression:
e
}
<<<<<<< HEAD
/* Annotation de type */
/* (e : ty) */
| LPAREN e=located(expression) COLON t=located(ty) RPAREN {
TypeAnnotation(e,t)
=======
/* Annotation de type
* (e : ty) */
| LPAREN e=located(expression) COLON t=located(ty) RPAREN {
TypeAnnotation(e, t)
>>>>>>> 726daf228d20fae695ecf903491c8b62d9e6a673
}
/* operateurs binaires */
/*
| e1=located(expression) b=binop e2=located(expression) {
Apply(Apply(b,e1),e2)
}*/
/* Operateurs binaires */
/* | e1=located(expression) b=binop e2=located(expression) {
Apply(Apply(b,e1),e2)
} */