Skip to content

Commit 3897265

Browse files
committed
drop ST warning
1 parent 3f09aa9 commit 3897265

File tree

2 files changed

+5
-1
lines changed
  • tool

2 files changed

+5
-1
lines changed

tool/resources/org/antlr/v4/tool/templates/codegen/Java/Java.stg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ case <index>:
416416
* overriding implementation impossible to maintain.
417417
*/
418418
RuleSempredFunction(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|
422422
case <index>:

tool/src/org/antlr/v4/codegen/Target.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff 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
});

0 commit comments

Comments
 (0)