Commit 7ce6ecd8 authored by Kim Nguyễn's avatar Kim Nguyễn
Browse files

Relax patterns authorized on let bindings :

let x & t = is now allowed.
parent 4cd1b774
...@@ -697,9 +697,15 @@ let_binding: ...@@ -697,9 +697,15 @@ let_binding:
; ;
ident_or_let_pat: ident_or_let_pat:
| p1 = ident_or_let_pat "&" p2 = ident_or_let_pat_constr { mk $sloc (And(p1, p2)) }
| p = ident_or_let_pat_constr { p }
;
ident_or_let_pat_constr:
| id = located_ident { mk $sloc (PatVar [ (snd id) ]) } | id = located_ident { mk $sloc (PatVar [ (snd id) ]) }
| p = constr_pat { p } | p = constr_pat { p }
| p1 = ident_or_let_pat "&" p2 =constr_pat { mk $sloc (And(p1, p2)) }
; ;
branches_: branches_:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment