fmt2
This commit is contained in:
parent
7683cada98
commit
726daf228d
1 changed files with 24 additions and 26 deletions
|
@ -352,12 +352,11 @@ expression:
|
|||
}
|
||||
|
||||
/* 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 {
|
||||
IfThenElse(e, e2, None)
|
||||
}
|
||||
*/
|
||||
} */
|
||||
|
||||
/* if ( expr ) then { expr } else { expr } */
|
||||
| IF LPAREN e=located(expression) RPAREN
|
||||
THEN LBRACE e2=located(expression) RBRACE
|
||||
|
@ -366,14 +365,12 @@ expression:
|
|||
}
|
||||
|
||||
/* Reference ref expr */
|
||||
|
||||
| REF e=located(expression) {
|
||||
Ref(e)
|
||||
}
|
||||
|
||||
/* Affectation */
|
||||
/* expr := expr */
|
||||
|
||||
/* Affectation
|
||||
* expr := expr */
|
||||
| e1=located(expression) ASSIGN e2=located(expression) {
|
||||
Assign(e1, e2)
|
||||
}
|
||||
|
@ -385,11 +382,12 @@ expression:
|
|||
While(e, e2)
|
||||
}
|
||||
|
||||
/* Do while TODO */
|
||||
/* do { expr } until ( expr ) */
|
||||
/* Do while
|
||||
* do { expr } until ( expr ) */
|
||||
/* TODO */
|
||||
|
||||
/* boucle for */
|
||||
/* for x in (e1 to e2) { expr } */
|
||||
/* 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
|
||||
LBRACE e3=located(expression) RBRACE {
|
||||
|
@ -401,8 +399,8 @@ expression:
|
|||
e
|
||||
}
|
||||
|
||||
/* Annotation de type */
|
||||
/* (e : ty) */
|
||||
/* Annotation de type
|
||||
* (e : ty) */
|
||||
| LPAREN e=located(expression) COLON t=located(ty) RPAREN {
|
||||
TypeAnnotation(e, t)
|
||||
}
|
||||
|
|
Reference in a new issue