newlines
This commit is contained in:
parent
48a9b8b23d
commit
8604834fe0
1 changed files with 12 additions and 6 deletions
|
@ -61,8 +61,10 @@ definition_typevariablelist:
|
|||
|
||||
tdefinition:
|
||||
/* Type sommes */
|
||||
/* 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_their_ty) {
|
||||
/* 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_their_ty) {
|
||||
DefineSumType(l)
|
||||
}
|
||||
/* Type produit étiqueté */
|
||||
|
@ -89,7 +91,8 @@ label_with_type:
|
|||
|
||||
vdefinition:
|
||||
/* Valeur simple */
|
||||
| LET i=located(identifier) ts=option(vdef_type_scheme) EQUAL e=located(expression) {
|
||||
| LET i=located(identifier) ts=option(vdef_type_scheme)
|
||||
EQUAL e=located(expression) {
|
||||
SimpleValue(i, ts, e)
|
||||
}
|
||||
/* Fonction(s)
|
||||
|
@ -225,7 +228,8 @@ ty:
|
|||
TyArrow(ty1, ty2)
|
||||
}
|
||||
/* N-uplets (N > 1) */
|
||||
| th=located(simple_ty) STAR tt=separated_nonempty_list(STAR, located(simple_ty)) {
|
||||
| th=located(simple_ty)
|
||||
STAR tt=separated_nonempty_list(STAR, located(simple_ty)) {
|
||||
TyTuple(th :: tt)
|
||||
}
|
||||
|
||||
|
@ -377,13 +381,15 @@ expression:
|
|||
}
|
||||
/* Do while - Boucle non bornée et non vide
|
||||
* do { expr } until ( expr ) */
|
||||
| DO LBRACE e1=located(expression) RBRACE UNTIL LPAREN e2=located(expression) RPAREN {
|
||||
| DO LBRACE e1=located(expression) RBRACE
|
||||
UNTIL LPAREN e2=located(expression) RPAREN {
|
||||
Sequence([e2 ; Position.unknown_pos (While(e1, e2))])
|
||||
}
|
||||
/* Boucle for - Boucle bornée
|
||||
* for x in (e1 to e2) { expr } */
|
||||
| FOR var=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
|
||||
LBRACE e3=located(expression) RBRACE {
|
||||
For(var, e1, e2, e3)
|
||||
}
|
||||
|
|
Reference in a new issue