/** * 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 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; }
@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; }