/** * Returns a deep clone of this {@link AIdentifierObjectDesignatorIR} node. * @return a deep clone of this {@link AIdentifierObjectDesignatorIR} node */ public AIdentifierObjectDesignatorIR clone() { return new AIdentifierObjectDesignatorIR( _sourceNode, _tag, _metaData, cloneNode(_exp) ); }
/** * Creates a new tree field only constructor {@code AIdentifierObjectDesignatorIR TAG=identifier} 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 exp_ the {@link SExpIR} node for the {@code exp} child of this {@link AIdentifierObjectDesignatorIR} node */ public AIdentifierObjectDesignatorIR(SExpIR exp_) { super(null,null,null); this.setExp(exp_); }
/** * Essentially this.toString().equals(o.toString()). **/ @Override public boolean equals(Object o) { if (o != null && o instanceof AIdentifierObjectDesignatorIR) { return toString().equals(o.toString()); } return false; }
@Override public SExpIR caseAIdentifierObjectDesignatorIR( AIdentifierObjectDesignatorIR node) throws AnalysisException { return node.getExp().clone(); }
@Override public SObjectDesignatorIR caseAIdentifierObjectDesignator( AIdentifierObjectDesignator node, IRInfo question) throws AnalysisException { AVariableExp exp = node.getExpression(); SExpIR expCg = exp.apply(question.getExpVisitor(), question); AIdentifierObjectDesignatorIR idObjDesignator = new AIdentifierObjectDesignatorIR(); if (!(expCg instanceof SVarExpIR)) { question.addUnsupportedNode(node, "Expected variable expression for identifier object designator. Got: " + expCg); return null; } idObjDesignator.setExp((SVarExpIR) expCg); return idObjDesignator; }
/** * Called by the {@link AIdentifierObjectDesignatorIR} node from {@link AIdentifierObjectDesignatorIR#apply(IAnalysis)}. * @param node the calling {@link AIdentifierObjectDesignatorIR} node */ public void caseAIdentifierObjectDesignatorIR(AIdentifierObjectDesignatorIR node) throws AnalysisException { _visitedNodes.add(node); inAIdentifierObjectDesignatorIR(node); if(node.getExp() != null && !_visitedNodes.contains(node.getExp())) { node.getExp().apply(this); } outAIdentifierObjectDesignatorIR(node); }
/** * Called by the {@link AIdentifierObjectDesignatorIR} node from {@link AIdentifierObjectDesignatorIR#apply(IIsaAnalysis)}. * @param node the calling {@link AIdentifierObjectDesignatorIR} node */ public void caseAIdentifierObjectDesignatorIR(AIdentifierObjectDesignatorIR node) throws AnalysisException { _visitedNodes.add(node); inAIdentifierObjectDesignatorIR(node); if(node.getExp() != null && !_visitedNodes.contains(node.getExp())) { node.getExp().apply(this); } outAIdentifierObjectDesignatorIR(node); }
/** * Creates a deep clone of this {@link AIdentifierObjectDesignatorIR} node while putting all * old node-new node relations in the map {@code oldToNewMap}. * @param oldToNewMap the map filled with the old node-new node relation * @return a deep clone of this {@link AIdentifierObjectDesignatorIR} node */ public AIdentifierObjectDesignatorIR clone(Map<INode,INode> oldToNewMap) { AIdentifierObjectDesignatorIR node = new AIdentifierObjectDesignatorIR( _sourceNode, _tag, _metaData, cloneNode(_exp, oldToNewMap) ); oldToNewMap.put(this, node); return node; }
/** * Creates a new complete constructor {@code AIdentifierObjectDesignatorIR} 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 exp_ the {@link SExpIR} node for the {@code exp} child of this {@link AIdentifierObjectDesignatorIR} node */ public AIdentifierObjectDesignatorIR(SourceNode sourceNode_, Object tag_, List<? extends ClonableString> metaData_, SExpIR exp_) { super(sourceNode_,tag_,metaData_); this.setExp(exp_); }
/** * Called by the {@link AIdentifierObjectDesignatorIR} node from {@link AIdentifierObjectDesignatorIR#apply(IAnalysis)}. * @param node the calling {@link AIdentifierObjectDesignatorIR} node */ public void caseAIdentifierObjectDesignatorIR(AIdentifierObjectDesignatorIR node, Q question) throws AnalysisException { _visitedNodes.add(node); inAIdentifierObjectDesignatorIR(node, question); if(node.getExp() != null && !_visitedNodes.contains(node.getExp())) { node.getExp().apply(this, question); } outAIdentifierObjectDesignatorIR(node, question); }
/** * Called by the {@link AIdentifierObjectDesignatorIR} node from {@link AIdentifierObjectDesignatorIR#apply(IAnalysis)}. * @param node the calling {@link AIdentifierObjectDesignatorIR} node */ public A caseAIdentifierObjectDesignatorIR(AIdentifierObjectDesignatorIR node) throws AnalysisException { _visitedNodes.add(node); A retVal = createNewReturnValue(node); mergeReturns(retVal,inAIdentifierObjectDesignatorIR(node)); if(node.getExp() != null && !_visitedNodes.contains(node.getExp())) { mergeReturns(retVal,node.getExp().apply(this)); } mergeReturns(retVal,outAIdentifierObjectDesignatorIR(node)); return retVal; }
/** * Called by the {@link AIdentifierObjectDesignatorIR} node from {@link AIdentifierObjectDesignatorIR#apply(IAnalysis)}. * @param node the calling {@link AIdentifierObjectDesignatorIR} node */ public A caseAIdentifierObjectDesignatorIR(AIdentifierObjectDesignatorIR node, Q question) throws AnalysisException { _visitedNodes.add(node); A retVal = createNewReturnValue(node, question); mergeReturns(retVal,inAIdentifierObjectDesignatorIR(node, question)); if(node.getExp() != null && !_visitedNodes.contains(node.getExp())) { mergeReturns(retVal,node.getExp().apply(this, question)); } mergeReturns(retVal,outAIdentifierObjectDesignatorIR(node, question)); return retVal; }