1. camlspotter
  2. mutated_ocaml

Commits

camlspotter  committed 61ef2be

fixed a bug in camlp4: ?x:_ is rejected

  • Participants
  • Parent commits ba2afb8
  • Branches pure

Comments (0)

Files changed (1)

File camlp4/Camlp4Parsers/Camlp4OCamlParser.ml

View file
  • Ignore whitespace
             <:patt< ~ $i$ : ($lid:i$ : $t$) >>
         | i = a_OPTLABEL; j = a_LIDENT -> (* ?a:b <> ?a : b *)
             <:patt< ? $i$ : ($lid:j$) >>
+        | i = a_OPTLABEL; "_" ->
+            <:patt< ? $i$ : (_) >>
         | i = a_OPTLABEL; "("; p = patt; ")" ->
             <:patt< ? $i$ : ($p$) >>
         | i = a_OPTLABEL; "("; p = patt; "="; e = expr; ")" ->