fix Pattern Tuple issue, add to much ( and )
This commit is contained in:
parent
556f637cf6
commit
f8d9068012
1 changed files with 9 additions and 4 deletions
|
@ -167,9 +167,14 @@ simple_pattern:
|
|||
PWildcard
|
||||
}
|
||||
/* N-uplets ou parenthésage */
|
||||
| LPAREN p=optionlist(separated_nonempty_list(COMMA, located(pattern))) RPAREN {
|
||||
PTuple(p)
|
||||
| LPAREN RPAREN {
|
||||
PTuple([])
|
||||
}
|
||||
| l=pattern_list {
|
||||
match l with | [alone] -> Position.value alone | _ -> PTuple(l)
|
||||
}
|
||||
|
||||
|
||||
/* Annotation de type */
|
||||
| p=located(simple_pattern) COLON ty=located(ty) {
|
||||
PTypeAnnotation(p, ty)
|
||||
|
|
Reference in a new issue