/** * Creates a new tree field only constructor {@code AMkTypeExp TAG=mkType} 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 typeName_ the {@link ILexNameToken} node for the {@code typeName} child of this {@link AMkTypeExp} node * @param args_ the {@link NodeList} node for the {@code args} child of this {@link AMkTypeExp} node */ public AMkTypeExp(ILexLocation location_, ILexNameToken typeName_, List<? extends PExp> args_) { super(null,location_); this.setTypeName(typeName_); this.setArgs(args_); }
/** * Creates a new complete constructor {@code AMkTypeExp} 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 typeName_ the {@link ILexNameToken} node for the {@code typeName} child of this {@link AMkTypeExp} node * @param args_ the {@link NodeList} node for the {@code args} child of this {@link AMkTypeExp} node * @param recordType_ the {@link ARecordInvariantType} <b>graph</a> node for the {@code recordType} child of this {@link AMkTypeExp} node. * <i>The parent of this {@code recordType } will not be changed by adding it to this node.</i> * @param argTypes_ the {@link GraphNodeList} <b>graph</a> node for the {@code argTypes} child of this {@link AMkTypeExp} node. * <i>The parent of this {@code argTypes } will not be changed by adding it to this node.</i> */ public AMkTypeExp(PType type_, ILexLocation location_, ILexNameToken typeName_, List<? extends PExp> args_, ARecordInvariantType recordType_, List<? extends PType> argTypes_) { super(type_,location_); this.setTypeName(typeName_); this.setArgs(args_); this.setRecordType(recordType_); this.setArgTypes(argTypes_); }
public static AMkTypeExp newAMkTypeExp(ILexNameToken typename, List<PExp> args) { AMkTypeExp result = new AMkTypeExp(); initExpression(result, typename.getLocation()); result.setTypeName(typename); result.setArgs(args); return result; }
public static AMkTypeExp newAMkTypeExp(ILexNameToken typeName, PType type, List<PExp> arglist) { AMkTypeExp mktype = new AMkTypeExp(); mktype.setType(type); if (type instanceof ARecordInvariantType) { mktype.setRecordType((ARecordInvariantType) type.clone()); } mktype.setTypeName(typeName); mktype.setArgs(arglist); return mktype; }
/** * Now, compound patterns involve recursive calls to expand their pattern components to expressions. * * @param node * @return * @throws AnalysisException */ public PExp caseARecordPattern(ARecordPattern node) throws AnalysisException { AMkTypeExp mkExp = new AMkTypeExp(); mkExp.setTypeName(node.getTypename().clone()); List<PExp> args = new Vector<PExp>(); for (PPattern p : node.getPlist()) { args.add(p.apply(this).clone()); } addPossibleType(mkExp, node); mkExp.setArgs(args); return mkExp; }