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
I tried to generate cpp lexer from https://github.com/antlr/grammars-v4/blob/master/cpp/pom.xml, but have a error like:
error: expected {, found throw
I think the problem is throw because rust not using throw new like java or C# for error handling.
--> src\cpp\cpp14parser.rs:23478:64
|
23478 | .val { it.get_text() } else { "null" } .compareTo("0")!=0) throw new InputMismatchException(this);
| ^^^^^ expected {
|
note: the if expression is missing a block after this condition
--> src\cpp\cpp14parser.rs:23477:6
|
23477 | if(if let Some(it) = &(cast::<_,PureSpecifierContext >(&*_localctx))
| ^
23478 | | .val { it.get_text() } else { "null" } .compareTo("0")!=0) throw new InputMismatchException(this);
| |________________________________________________________^
help: try placing this code inside a block
|
23478 | .val { it.get_text() } else { "null" } .compareTo("0")!=0) { throw } new InputMismatchException(this);
| + +
The text was updated successfully, but these errors were encountered:
I tried to generate cpp lexer from https://github.com/antlr/grammars-v4/blob/master/cpp/pom.xml, but have a error like:
error: expected
{
, foundthrow
I think the problem is
throw
because rust not usingthrow new
like java or C# for error handling.23478 | .val { it.get_text() } else { "null" } .compareTo("0")!=0) throw new InputMismatchException(this);
| ^^^^^ expected
{
|
note: the
if
expression is missing a block after this condition--> src\cpp\cpp14parser.rs:23477:6
|
23477 | if(if let Some(it) = &(cast::<_,PureSpecifierContext >(&*_localctx))
| ^
23478 | | .val { it.get_text() } else { "null" } .compareTo("0")!=0) throw new InputMismatchException(this);
| |________________________________________________________^
help: try placing this code inside a block
|
23478 | .val { it.get_text() } else { "null" } .compareTo("0")!=0) { throw } new InputMismatchException(this);
| + +
The text was updated successfully, but these errors were encountered: