/** * Creates a new tree field only constructor {@code AIncrementStmIR TAG=increment} 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 var_ the {@link SExpIR} node for the {@code var} child of this {@link AIncrementStmIR} node */ public AIncrementStmIR(SExpIR var_) { super(null,null,null); this.setVar(var_); }
/** * Creates a new complete constructor {@code AIncrementStmIR} 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 var_ the {@link SExpIR} node for the {@code var} child of this {@link AIncrementStmIR} node */ public AIncrementStmIR(SourceNode sourceNode_, Object tag_, List<? extends ClonableString> metaData_, SExpIR var_) { super(sourceNode_,tag_,metaData_); this.setVar(var_); }
public AIfStmIR consConditionalIncrement(String counterName, SExpIR predicate) { AIdentifierVarExpIR col = new AIdentifierVarExpIR(); col.setType(new AIntNumericBasicTypeIR()); col.setIsLambda(false); col.setIsLocal(true); col.setName(counterName); AIncrementStmIR inc = new AIncrementStmIR(); inc.setVar(col); AIfStmIR ifStm = new AIfStmIR(); ifStm.setIfExp(predicate); ifStm.setThenStm(inc); return ifStm; }
inc.setVar(col);