LighterASTNode (LighterAST tree, LighterASTNode expr, boolean isCall) { LighterASTNode qualifier = tree.getChildren(expr).get(0); if (isCall) { List<LighterASTNode> children = tree.getChildren(qualifier); qualifier = children.isEmpty() ? null : children.get(0); } return qualifier != null && ElementType.EXPRESSION_BIT_SET.contains(qualifier.getTokenType()) ? qualifier : null; }