/** * Creates a new tree field only constructor {@code ATupleExp TAG=tuple} 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 args_ the {@link NodeList} node for the {@code args} child of this {@link ATupleExp} node */ public ATupleExp(ILexLocation location_, List<? extends PExp> args_) { super(null,location_); this.setArgs(args_); }
/** * Creates a new complete constructor {@code ATupleExp} 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 args_ the {@link NodeList} node for the {@code args} child of this {@link ATupleExp} node * @param types_ the {@link GraphNodeList} <b>graph</a> node for the {@code types} child of this {@link ATupleExp} node. * <i>The parent of this {@code types } will not be changed by adding it to this node.</i> */ public ATupleExp(PType type_, ILexLocation location_, List<? extends PExp> args_, List<? extends PType> types_) { super(type_,location_); this.setArgs(args_); this.setTypes(types_); }
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; }