/** * Creates a new complete constructor {@code AIfStm} 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 ifExp_ the {@link PExp} node for the {@code ifExp} child of this {@link AIfStm} node * @param thenStm_ the {@link PStm} node for the {@code thenStm} child of this {@link AIfStm} node * @param elseIf_ the {@link NodeList} node for the {@code elseIf} child of this {@link AIfStm} node * @param elseStm_ the {@link PStm} node for the {@code elseStm} child of this {@link AIfStm} node */ public AIfStm(ILexLocation location_, PType type_, PExp ifExp_, PStm thenStm_, List<? extends AElseIfStm> elseIf_, PStm elseStm_) { super(location_,type_); this.setIfExp(ifExp_); this.setThenStm(thenStm_); this.setElseIf(elseIf_); this.setElseStm(elseStm_); }
/** * Creates a new tree field only constructor {@code AIfStm TAG=if} 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 ifExp_ the {@link PExp} node for the {@code ifExp} child of this {@link AIfStm} node * @param thenStm_ the {@link PStm} node for the {@code thenStm} child of this {@link AIfStm} node * @param elseIf_ the {@link NodeList} node for the {@code elseIf} child of this {@link AIfStm} node * @param elseStm_ the {@link PStm} node for the {@code elseStm} child of this {@link AIfStm} node */ public AIfStm(ILexLocation location_, PExp ifExp_, PStm thenStm_, List<? extends AElseIfStm> elseIf_, PStm elseStm_) { super(location_,null); this.setIfExp(ifExp_); this.setThenStm(thenStm_); this.setElseIf(elseIf_); this.setElseStm(elseStm_); }
public static AIfStm newAIfStm(ILexLocation token, PExp ifExp, PStm thenStmt, List<AElseIfStm> elseIfList, PStm elseStmt) { AIfStm result = new AIfStm(); initStatement(result, token); result.setIfExp(ifExp); result.setThenStm(thenStmt); result.setElseIf(elseIfList); result.setElseStm(elseStmt); return result; }