/** * Returns a deep clone of this {@link ATupleExp} node. * @return a deep clone of this {@link ATupleExp} node */ public ATupleExp clone() { return new ATupleExp( _type, _location, cloneList(_args), _types ); }
/** * Creates a deep clone of this {@link ATupleExp} 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 ATupleExp} node */ public ATupleExp clone(Map<INode,INode> oldToNewMap) { ATupleExp node = new ATupleExp( _type, _location, cloneList(_args, oldToNewMap), _types ); oldToNewMap.put(this, node); return node; }
public static ATupleExp newATupleExp(ILexLocation location, List<PExp> args) { ATupleExp result = new ATupleExp(); initExpression(result, location); result.setArgs(args); return result; }
public PExp caseATuplePattern(ATuplePattern node) throws AnalysisException { ATupleExp tuple = new ATupleExp(); List<PExp> values = new Vector<PExp>(); for (PPattern p : node.getPlist()) { PExp e = p.apply(this); values.add(e.clone()); } addPossibleType(tuple, node); tuple.setArgs(values); return tuple; }