/** * Creates a new complete constructor {@code APatternListTypePair} 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 patterns_ the {@link NodeList} node for the {@code patterns} child of this {@link APatternListTypePair} node * @param type_ the {@link PType} <b>graph</a> node for the {@code type} child of this {@link APatternListTypePair} node. * <i>The parent of this {@code type } will not be changed by adding it to this node.</i> */ public APatternListTypePair(Boolean resolved_, List<? extends PPattern> patterns_, PType type_) { super(resolved_); this.setPatterns(patterns_); this.setType(type_); }
public static APatternListTypePair newAPatternListTypePair( List<PPattern> patterns, PType type) { APatternListTypePair result = new APatternListTypePair(); result.setPatterns(patterns); result.setType(type); return result; }
@Override public void caseAPatternListTypePair(APatternListTypePair pltp, NewQuestion question) throws AnalysisException { af.createPPatternListAssistant().typeResolve(pltp.getPatterns(), question.rootVisitor, question.question); PType type = af.createPTypeAssistant().typeResolve(pltp.getType(), null, question.rootVisitor, question.question); pltp.setType(type); }