conflits?
This commit is contained in:
parent
8ed2b0c51f
commit
5692c73984
1 changed files with 6 additions and 43 deletions
|
@ -354,41 +354,17 @@ expression:
|
||||||
Apply(e1, e2)
|
Apply(e1, e2)
|
||||||
}
|
}
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
/* TODO operation binaire mais j'ai pas très bien compris encore */
|
|
||||||
|
|
||||||
>>>>>>> 726daf228d20fae695ecf903491c8b62d9e6a673
|
|
||||||
|
|
||||||
/* Match (exp) {| ...| ... | ...} */
|
/* 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)
|
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 */
|
/* TODO if ( exp ) then { expr } j'ai RIEN COMPRIS */
|
||||||
/* | IF LPAREN e=located(expression) RPAREN
|
/* | IF LPAREN e=located(expression) RPAREN
|
||||||
THEN LBRACE e2=located(expression) RBRACE {
|
THEN LBRACE e2=located(expression) RBRACE {
|
||||||
IfThenElse(e, e2, None)
|
IfThenElse(e, e2, None)
|
||||||
} */
|
} */
|
||||||
>>>>>>> 726daf228d20fae695ecf903491c8b62d9e6a673
|
|
||||||
|
|
||||||
/* if ( expr ) then { expr } else { expr } */
|
/* if ( expr ) then { expr } else { expr } */
|
||||||
| IF LPAREN e=located(expression) RPAREN
|
| IF LPAREN e=located(expression) RPAREN
|
||||||
|
@ -419,7 +395,7 @@ expression:
|
||||||
* do { expr } until ( expr ) */
|
* do { expr } until ( expr ) */
|
||||||
/* TODO */
|
/* TODO */
|
||||||
|
|
||||||
/* boucle for
|
/* Boucle for
|
||||||
* for x in (e1 to e2) { expr } */
|
* for x in (e1 to e2) { expr } */
|
||||||
| FOR x=located(identifier)
|
| FOR x=located(identifier)
|
||||||
FROM LPAREN e1=located(expression) RPAREN TO LPAREN e2=located(expression) RPAREN
|
FROM LPAREN e1=located(expression) RPAREN TO LPAREN e2=located(expression) RPAREN
|
||||||
|
@ -432,30 +408,17 @@ expression:
|
||||||
e
|
e
|
||||||
}
|
}
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
|
|
||||||
|
|
||||||
/* Annotation de type */
|
|
||||||
/* (e : ty) */
|
|
||||||
| LPAREN e=located(expression) COLON t=located(ty) RPAREN {
|
|
||||||
TypeAnnotation(e,t)
|
|
||||||
=======
|
|
||||||
/* Annotation de type
|
/* Annotation de type
|
||||||
* (e : ty) */
|
* (e : ty) */
|
||||||
| LPAREN e=located(expression) COLON t=located(ty) RPAREN {
|
| LPAREN e=located(expression) COLON t=located(ty) RPAREN {
|
||||||
TypeAnnotation(e, t)
|
TypeAnnotation(e, t)
|
||||||
>>>>>>> 726daf228d20fae695ecf903491c8b62d9e6a673
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* operateurs binaires */
|
/* Operateurs binaires */
|
||||||
|
/* | e1=located(expression) b=binop e2=located(expression) {
|
||||||
/*
|
|
||||||
| e1=located(expression) b=binop e2=located(expression) {
|
|
||||||
Apply(Apply(b,e1),e2)
|
Apply(Apply(b,e1),e2)
|
||||||
}*/
|
} */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Reference in a new issue