LighterASTNode (LighterAST tree, LighterASTNode node) { LighterASTNode expressionList = skipExpressionsUp(tree, node, TokenSet.create(EXPRESSION_LIST)); if (expressionList != null) { LighterASTNode parent = tree.getParent(expressionList); if (parent != null && parent.getTokenType() == ANONYMOUS_CLASS) { parent = tree.getParent(parent); } if (parent != null && (parent.getTokenType() == METHOD_CALL_EXPRESSION || parent.getTokenType() == NEW_EXPRESSION)) { return parent; } } return null; }