/** * Creates a new complete constructor {@code ASetMultipleBind} 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 set_ the {@link PExp} node for the {@code set} child of this {@link ASetMultipleBind} node */ public ASetMultipleBind(ILexLocation location_, List<? extends PPattern> plist_, PExp set_) { super(location_,plist_); this.setSet(set_); }
public static ASetMultipleBind newASetMultipleBind(List<PPattern> plist, PExp readExpression) { ASetMultipleBind result = new ASetMultipleBind(); result.setLocation(plist.get(0).getLocation()); result.setPlist(plist); result.setSet(readExpression); return result; }
/** * Create a multiple set bind with a varargs list of pattern variables, like a,b,c in set S. This is used by several * obligations. */ protected PMultipleBind getMultipleSetBind(PExp setExp, ILexNameToken... patternNames) { ASetMultipleBind setBind = new ASetMultipleBind(); List<PPattern> patternList = new Vector<PPattern>(); for (ILexNameToken patternName : patternNames) { AIdentifierPattern pattern = new AIdentifierPattern(); pattern.setName(patternName.clone()); patternList.add(pattern); } setBind.setPlist(patternList); setBind.setSet(setExp.clone()); return setBind; }