You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
make RegexParser.err handle whitespace like literal and regex.
This overrides `err` in RegexParser to make it consume whitespace just
like regex and literal. The original motivation was:
object parser extends RegexParsers {
def num = "\\d+".r
def twoNums = num ~ (num | err("error!"))
}
// succeeds
parser.parseAll(twoNums, "42 721")
// fails with a parsing Failure instead of an Error
// because err doesn't consume the whitespace but the regex does.
parser.parseAll(twoNums, "42 foo")
This may change the output of some parsers that failed to parse input
(from a Failure to an Error).
Fixesscala#29
0 commit comments