Reintroduce AntlrNode
This commit is contained in:
@ -16,5 +16,5 @@ public abstract class AbstractSwiftRule extends AntlrBaseRule {
|
||||
}
|
||||
|
||||
@Override
|
||||
public abstract ParseTreeVisitor<Void> buildVisitor(RuleContext ctx);
|
||||
public abstract ParseTreeVisitor<Void> buildVisitor(RuleContext ruleCtx);
|
||||
}
|
||||
|
@ -13,13 +13,13 @@ import net.sourceforge.pmd.lang.ast.impl.antlr4.AntlrNameDictionary;
|
||||
|
||||
final class SwiftNameDictionary extends AntlrNameDictionary {
|
||||
|
||||
public SwiftNameDictionary(Vocabulary vocab, String[] ruleNames) {
|
||||
SwiftNameDictionary(Vocabulary vocab, String[] ruleNames) {
|
||||
super(vocab, ruleNames);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected @Nullable String nonAlphaNumName(String name) {
|
||||
{
|
||||
{ // limit scope of 'sup', which would be null outside of here anyway
|
||||
String sup = super.nonAlphaNumName(name);
|
||||
if (sup != null) {
|
||||
return sup;
|
||||
|
@ -4,16 +4,13 @@
|
||||
|
||||
package net.sourceforge.pmd.lang.swift.ast;
|
||||
|
||||
import org.antlr.v4.runtime.tree.ParseTreeVisitor;
|
||||
|
||||
import net.sourceforge.pmd.lang.ast.impl.GenericNode;
|
||||
import net.sourceforge.pmd.lang.ast.impl.antlr4.AntlrNode;
|
||||
|
||||
|
||||
/**
|
||||
* Supertype of all swift nodes.
|
||||
*/
|
||||
public interface SwiftNode extends GenericNode<SwiftNode> {
|
||||
public interface SwiftNode extends AntlrNode<SwiftNode> {
|
||||
|
||||
<T> T accept(ParseTreeVisitor<? extends T> visitor);
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user