/**
* Remove the separator (,) between arguments.
*
* @param file Source file to edit.
* @param context ExpressionList context.
* @param index Parameter index of the argument ("a", "b") "a" = 0, "b" = 1
*/
private void removeCallSeparator(SourceFile file,
ExpressionListContext context, int index) {
ParseTree item = null;
// Remove separator after argument.
if (index == 0 && context.getChildCount() >= index + 1) {
item = context.getChild(index + 1);
} else if (context.getChildCount() >= index - 1) {
item = context.getChild(index - 1);
}
if (item instanceof TerminalNodeImpl &&
item.getText().equals(",")) {
file.getRewriter().delete(((TerminalNodeImpl)item).getPayload());
}
}
RemoveParameterSolver.java 文件源码
java
阅读 17
收藏 0
点赞 0
评论 0
项目:Purify
作者:
评论列表
文章目录