/** * Creates a new complete constructor {@code ALetDefExpIR} 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 localDefs_ the {@link NodeList} node for the {@code localDefs} child of this {@link ALetDefExpIR} node * @param exp_ the {@link SExpIR} node for the {@code exp} child of this {@link ALetDefExpIR} node */ public ALetDefExpIR(SourceNode sourceNode_, Object tag_, List<? extends ClonableString> metaData_, STypeIR type_, List<? extends AVarDeclIR> localDefs_, SExpIR exp_) { super(sourceNode_,tag_,metaData_,type_); this.setLocalDefs(localDefs_); this.setExp(exp_); }
/** * Creates a new tree field only constructor {@code ALetDefExpIR TAG=letDef} 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 localDefs_ the {@link NodeList} node for the {@code localDefs} child of this {@link ALetDefExpIR} node * @param exp_ the {@link SExpIR} node for the {@code exp} child of this {@link ALetDefExpIR} node */ public ALetDefExpIR(STypeIR type_, List<? extends AVarDeclIR> localDefs_, SExpIR exp_) { super(null,null,null,type_); this.setLocalDefs(localDefs_); this.setExp(exp_); }
@Override public SExpIR caseALetDefExp(ALetDefExp node, IRInfo question) throws AnalysisException { PType type = node.getType(); PExp exp = node.getExpression(); ALetDefExpIR letDefExp = new ALetDefExpIR(); question.getDeclAssistant().setFinalLocalDefs(node.getLocalDefs(), letDefExp.getLocalDefs(), question); STypeIR typeCg = type.apply(question.getTypeVisitor(), question); letDefExp.setType(typeCg); SExpIR expCg = exp.apply(question.getExpVisitor(), question); letDefExp.setExp(expCg); return letDefExp; }