File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
resources/org/antlr/v4/tool/templates/codegen/Java Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -416,7 +416,7 @@ case <index>:
416416 * overriding implementation impossible to maintain.
417417 */
418418RuleSempredFunction(r, actions) ::= <<
419- private boolean <r.name>_sempred(<if(r. && parser.file.genLean)><parser.name>Contexts.<endif><r.ctxType> _localctx, int predIndex) {
419+ private boolean <r.name>_sempred(<if(parser.file.genLean)><parser.name>Contexts.<endif><r.ctxType> _localctx, int predIndex) {
420420 switch (predIndex) {
421421 <actions:{index|
422422case <index>:
Original file line number Diff line number Diff line change @@ -607,6 +607,10 @@ public void internalError(STMessage msg) {
607607 }
608608
609609 private void reportError (STMessage msg ) {
610+ // TODO check how to avoid this with Ter
611+ if ("/RuleSempredFunction()" .equals (String .valueOf (msg .self )) && "Java" .equals (String .valueOf (msg .self .groupThatCreatedThisInstance ))) {
612+ return ;
613+ }
610614 getCodeGenerator ().tool .errMgr .toolError (ErrorType .STRING_TEMPLATE_WARNING , msg .cause , msg .toString ());
611615 }
612616 });
You can’t perform that action at this time.
0 commit comments