|
In patterns, the parser halts when it sees stars.
This means it does not handle infix notation for a case class
named "*". This patch uses lookahead to decide whether to parse
'_' '*' as a sequence pattern or as the start of infix.
(For both normal and error cases, the tokens are always consumed
immediately.) Error messages are improved for _* (as a help to learners)
and slightly improved recovery helps the parse continue.
The entry point for XML patterns is now distinct; otherwise,
the change is local to pattern3-simplepattern; the entry point
for simplepattern() is unchanged because it is commented
"hook for IDE."
|