/** * Creates a new tree field only constructor {@code AApplyObjectDesignatorIR TAG=apply} node with the given nodes as children. * @deprecated This method should not be used, use AstFactory instead. * The basic child nodes are removed from their previous parents. * @param object_ the {@link SObjectDesignatorIR} node for the {@code object} child of this {@link AApplyObjectDesignatorIR} node * @param args_ the {@link NodeList} node for the {@code args} child of this {@link AApplyObjectDesignatorIR} node */ public AApplyObjectDesignatorIR(SObjectDesignatorIR object_, List<? extends SExpIR> args_) { super(null,null,null); this.setObject(object_); this.setArgs(args_); }
/** * Creates a new complete constructor {@code AApplyObjectDesignatorIR} node with the given nodes as children. * @deprecated This method should not be used, use AstFactory instead. * The basic child nodes are removed from their previous parents. * @param object_ the {@link SObjectDesignatorIR} node for the {@code object} child of this {@link AApplyObjectDesignatorIR} node * @param args_ the {@link NodeList} node for the {@code args} child of this {@link AApplyObjectDesignatorIR} node */ public AApplyObjectDesignatorIR(SourceNode sourceNode_, Object tag_, List<? extends ClonableString> metaData_, SObjectDesignatorIR object_, List<? extends SExpIR> args_) { super(sourceNode_,tag_,metaData_); this.setObject(object_); this.setArgs(args_); }
@Override public SObjectDesignatorIR caseAApplyObjectDesignator( AApplyObjectDesignator node, IRInfo question) throws AnalysisException { PObjectDesignator obj = node.getObject(); SObjectDesignatorIR objCg = obj.apply(question.getObjectDesignatorVisitor(), question); AApplyObjectDesignatorIR applyObjDesignator = new AApplyObjectDesignatorIR(); applyObjDesignator.setObject(objCg); LinkedList<SExpIR> newExpArgs = applyObjDesignator.getArgs(); for (PExp arg : node.getArgs()) { SExpIR argCg = arg.apply(question.getExpVisitor(), question); if (argCg != null) { newExpArgs.add(argCg); } else { return null; } } return applyObjDesignator; }