List of usage examples for org.antlr.v4.runtime.tree TerminalNodeImpl getPayload
@Override
public Token getPayload()
From source file:nl.han.ica.ap.purify.module.java.removeparameter.RemoveParameterSolver.java
License:Open Source License
/** * Remove separator (,)./*from w w w.ja va 2s. c om*/ * * @param file Source file of the parse tree. * @param context Parameter with , */ private void removeSeparator(SourceFile file, FormalParameterDeclsRestContext context) { for (int i = context.getChildCount() - 1; i >= 0; i--) { if (context.getChild(i) instanceof TerminalNodeImpl && context.getChild(i).getText().equals(",")) { TerminalNodeImpl node = (TerminalNodeImpl) context.getChild(i); file.getRewriter().delete(node.getPayload()); } } }