Commits

camlspotter committed 61ef2be

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

Comments (0)

Files changed (1)

camlp4/Camlp4Parsers/Camlp4OCamlParser.ml

             <: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; ")" ->