/** * Creates a deep clone of this {@link AMapOverrideBinaryExpIR} 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 AMapOverrideBinaryExpIR} node */ public AMapOverrideBinaryExpIR clone(Map<INode,INode> oldToNewMap) { AMapOverrideBinaryExpIR node = new AMapOverrideBinaryExpIR( _sourceNode, _tag, _metaData, cloneNode(_type, oldToNewMap), cloneNode(_left, oldToNewMap), cloneNode(_right, oldToNewMap) ); oldToNewMap.put(this, node); return node; }
/** * Returns a deep clone of this {@link AMapOverrideBinaryExpIR} node. * @return a deep clone of this {@link AMapOverrideBinaryExpIR} node */ public AMapOverrideBinaryExpIR clone() { return new AMapOverrideBinaryExpIR( _sourceNode, _tag, _metaData, cloneNode(_type), cloneNode(_left), cloneNode(_right) ); }
@Override public SExpIR caseAPlusPlusBinaryExp(APlusPlusBinaryExp node, IRInfo question) throws AnalysisException { if (node.getType() instanceof SSeqType) { return question.getExpAssistant().handleBinaryExp(node, new ASeqModificationBinaryExpIR(), question); } else if (node.getType() instanceof SMapType) { return question.getExpAssistant().handleBinaryExp(node, new AMapOverrideBinaryExpIR(), question); } question.addUnsupportedNode(node, "Expected sequence or map type for '++' binary expression but got: " + node.getType()); return null; }