We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
|
parboiled2 type system should catch errors in a grammar as follows:
parboiled2
class SomeParser extends Parser { def test = rule { push("x") ~ (a | b) } def a = rule { str("a") ~> { (i: Int) => push("a") } } def b = rule { str("b") ~> { (i: String) => push("b") } } }
Currently it fails in runtime:
scala> new org.parboiled2.examples.SomeParser("a").test.run() res0: scala.util.Try[String] = Failure(java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer) scala> new org.parboiled2.examples.SomeParser("b").test.run() res1: scala.util.Try[String] = Success(b)
Mail list discussion.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
parboiled2
type system should catch errors in a grammar as follows:Currently it fails in runtime:
Mail list discussion.
The text was updated successfully, but these errors were encountered: