/** * Creates a deep clone of this {@link AElseIfExp} 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 AElseIfExp} node */ public AElseIfExp clone(Map<INode,INode> oldToNewMap) { AElseIfExp node = new AElseIfExp( _type, _location, cloneNode(_elseIf, oldToNewMap), cloneNode(_then, oldToNewMap) ); oldToNewMap.put(this, node); return node; }
/** * Returns a deep clone of this {@link AElseIfExp} node. * @return a deep clone of this {@link AElseIfExp} node */ public AElseIfExp clone() { return new AElseIfExp( _type, _location, cloneNode(_elseIf), cloneNode(_then) ); }
public static AElseIfExp newAElseIfExp(ILexLocation start, PExp elseIfExp, PExp thenExp) { AElseIfExp result = new AElseIfExp(); initExpression(result, start); result.setElseIf(elseIfExp); result.setThen(thenExp); return result; }