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
When phrase is applied to successful parse result which has lastFailure, it returns only the original failure.
I think it would be better to add a message that indicates the EOF is expected in the same way as it does when lastFailure is None.
For example, the following p fails because there are trailing spaces after d, but error message comes from c parse failure which doesn't have any hint for EOF.
val input = "a b d "
val p = phase(/* a parser that parses `a b (c or d)`*/)
When
phrase
is applied to successful parse result which haslastFailure
, it returns only the original failure.I think it would be better to add a message that indicates the EOF is expected in the same way as it does when lastFailure is
None
.For example, the following
p
fails because there are trailing spaces afterd
, but error message comes fromc
parse failure which doesn't have any hint for EOF.scala-parser-combinators/shared/src/main/scala/scala/util/parsing/combinator/Parsers.scala
Line 996 in 82d8524
The text was updated successfully, but these errors were encountered: