/** * Creates a new tree field only constructor {@code ATypeBindIR TAG=type} 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 type_ the {@link STypeIR} node for the {@code type} child of this {@link ATypeBindIR} node */ public ATypeBindIR(SPatternIR pattern_, STypeIR type_) { super(null,null,null,pattern_); this.setType(type_); }
/** * Creates a new complete constructor {@code ATypeBindIR} 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 type_ the {@link STypeIR} node for the {@code type} child of this {@link ATypeBindIR} node */ public ATypeBindIR(SourceNode sourceNode_, Object tag_, List<? extends ClonableString> metaData_, SPatternIR pattern_, STypeIR type_) { super(sourceNode_,tag_,metaData_,pattern_); this.setType(type_); }
@Override public SBindIR caseATypeBind(ATypeBind node, IRInfo question) throws AnalysisException { PPattern pattern = node.getPattern(); SPatternIR patternCg = pattern.apply(question.getPatternVisitor(), question); PType boundType = node.getType(); STypeIR boundTypeCg = boundType.apply(question.getTypeVisitor(), question); ATypeBindIR setBind = new ATypeBindIR(); setBind.setPattern(patternCg); setBind.setType(boundTypeCg); return setBind; }