/** * Creates a new complete constructor {@code APatternTypePair} 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 pattern_ the {@link PPattern} node for the {@code pattern} child of this {@link APatternTypePair} node * @param type_ the {@link PType} <b>graph</a> node for the {@code type} child of this {@link APatternTypePair} node. * <i>The parent of this {@code type } will not be changed by adding it to this node.</i> */ public APatternTypePair(Boolean resolved_, PPattern pattern_, PType type_) { super(resolved_); this.setPattern(pattern_); this.setType(type_); }
public static APatternTypePair newAPatternTypePair(PPattern pattern, PType type) { APatternTypePair result = new APatternTypePair(); result.setResolved(false); result.setPattern(pattern); result.setType(type); return result; }
public void typeResolve(APatternTypePair result, IQuestionAnswer<TypeCheckInfo, PType> rootVisitor, TypeCheckInfo question) { if (result.getResolved()) { return; } else { result.setResolved(true); } result.setType(af.createPTypeAssistant().typeResolve(result.getType(), null, rootVisitor, question)); }