/** * Creates a new tree field only constructor {@code ACasesExp TAG=cases} 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 expression_ the {@link PExp} node for the {@code expression} child of this {@link ACasesExp} node * @param cases_ the {@link NodeList} node for the {@code cases} child of this {@link ACasesExp} node * @param others_ the {@link PExp} node for the {@code others} child of this {@link ACasesExp} node */ public ACasesExp(ILexLocation location_, PExp expression_, List<? extends ACaseAlternative> cases_, PExp others_) { super(null,location_); this.setExpression(expression_); this.setCases(cases_); this.setOthers(others_); }
/** * Creates a new complete constructor {@code ACasesExp} 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 expression_ the {@link PExp} node for the {@code expression} child of this {@link ACasesExp} node * @param cases_ the {@link NodeList} node for the {@code cases} child of this {@link ACasesExp} node * @param others_ the {@link PExp} node for the {@code others} child of this {@link ACasesExp} node */ public ACasesExp(PType type_, ILexLocation location_, PExp expression_, List<? extends ACaseAlternative> cases_, PExp others_) { super(type_,location_); this.setExpression(expression_); this.setCases(cases_); this.setOthers(others_); }
public static ACasesExp newACasesExp(ILexLocation start, PExp exp, List<ACaseAlternative> cases, PExp others) { ACasesExp result = new ACasesExp(); initExpression(result, start); result.setExpression(exp); result.setCases(cases); result.setOthers(others); return result; }