Skip to content

Commit

Permalink
Remove redundant parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
daniellansun authored Oct 9, 2019
1 parent 95fc657 commit 2bd3930
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tool/resources/org/antlr/v4/tool/templates/codegen/Java/Java.stg
Original file line number Diff line number Diff line change
Expand Up @@ -233,16 +233,16 @@ public <if(parser.abstractRecognizer)>abstract <endif>class <parser.name> extend
public String getSerializedATN() { return _serializedATN; }

@NotNull
private FailedPredicateException createFailedPredicateException(@NotNull Parser recognizer) {
return createFailedPredicateException(recognizer, null);
private FailedPredicateException createFailedPredicateException() {
return createFailedPredicateException(null);
}
@NotNull
private FailedPredicateException createFailedPredicateException(@NotNull Parser recognizer, @Nullable String predicate) {
return createFailedPredicateException(recognizer, predicate, null);
private FailedPredicateException createFailedPredicateException(@Nullable String predicate) {
return createFailedPredicateException(predicate, null);
}
@NotNull
protected FailedPredicateException createFailedPredicateException(@NotNull Parser recognizer, @Nullable String predicate, @Nullable String message) {
return new FailedPredicateException(recognizer, predicate, message);
protected FailedPredicateException createFailedPredicateException(@Nullable String predicate, @Nullable String message) {
return new FailedPredicateException(this, predicate, message);
}

<namedActions.members>
Expand Down Expand Up @@ -728,7 +728,7 @@ ArgAction(a, chunks) ::= "<chunks>"

SemPred(p, chunks, failChunks) ::= <<
setState(<p.stateNumber>);
if (!(<chunks>)) throw createFailedPredicateException(this, <p.predicate><if(failChunks)>, <failChunks><elseif(p.msg)>, <p.msg><endif>);
if (!(<chunks>)) throw createFailedPredicateException(<p.predicate><if(failChunks)>, <failChunks><elseif(p.msg)>, <p.msg><endif>);
>>

ExceptionClause(e, catchArg, catchAction) ::= <<
Expand Down

0 comments on commit 2bd3930

Please sign in to comment.