public static AEqualsDefinition newAEqualsDefinition(ILexLocation location, PPattern pattern, PExp test) { AEqualsDefinition result = AstFactory.newAEqualsDefinition(location); result.setPattern(pattern); result.setTypebind(null); result.setSetbind(null); result.setTest(test); return result; }
public static AEqualsDefinition newAEqualsDefinition(ILexLocation location, ATypeBind typebind, PExp test) { AEqualsDefinition result = AstFactory.newAEqualsDefinition(location); result.setPattern(null); result.setTypebind(typebind); result.setSetbind(null); result.setTest(test); return result; }
public static AEqualsDefinition newAEqualsDefinition(ILexLocation location, PBind bind, PExp test) { AEqualsDefinition result = AstFactory.newAEqualsDefinition(location); result.setPattern(null); result.setTypebind(null); if (bind instanceof ASetBind) { result.setSetbind((ASetBind) bind); } else { result.setSeqbind((ASeqBind) bind); } result.setTest(test); return result; }
/** * Creates a new tree field only constructor {@code AEqualsDefinition TAG=equals} 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 pattern_ the {@link PPattern} node for the {@code pattern} child of this {@link AEqualsDefinition} node * @param typebind_ the {@link ATypeBind} node for the {@code typebind} child of this {@link AEqualsDefinition} node * @param setbind_ the {@link ASetBind} node for the {@code setbind} child of this {@link AEqualsDefinition} node * @param seqbind_ the {@link ASeqBind} node for the {@code seqbind} child of this {@link AEqualsDefinition} node * @param test_ the {@link PExp} node for the {@code test} child of this {@link AEqualsDefinition} node * @param defs_ the {@link NodeList} node for the {@code defs} child of this {@link AEqualsDefinition} node */ public AEqualsDefinition(ILexLocation location_, NameScope nameScope_, Boolean used_, AAccessSpecifierAccessSpecifier access_, Pass pass_, PPattern pattern_, ATypeBind typebind_, ASetBind setbind_, ASeqBind seqbind_, PExp test_, List<? extends PDefinition> defs_) { super(location_,null,nameScope_,used_,null,access_,null,pass_); this.setPattern(pattern_); this.setTypebind(typebind_); this.setSetbind(setbind_); this.setSeqbind(seqbind_); this.setTest(test_); this.setDefs(defs_); }
localDef.setPattern(result.getPattern().clone()); localDef.setType(result.getType().clone()); localDef.setTest(body.clone()); List<PDefinition> defs = new LinkedList<PDefinition>(); defs.add(localDef);
/** * Creates a new complete constructor {@code AEqualsDefinition} 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 pattern_ the {@link PPattern} node for the {@code pattern} child of this {@link AEqualsDefinition} node * @param typebind_ the {@link ATypeBind} node for the {@code typebind} child of this {@link AEqualsDefinition} node * @param setbind_ the {@link ASetBind} node for the {@code setbind} child of this {@link AEqualsDefinition} node * @param seqbind_ the {@link ASeqBind} node for the {@code seqbind} child of this {@link AEqualsDefinition} node * @param test_ the {@link PExp} node for the {@code test} child of this {@link AEqualsDefinition} node * @param expType_ the {@link PType} <b>graph</a> node for the {@code expType} child of this {@link AEqualsDefinition} node. * <i>The parent of this {@code expType } will not be changed by adding it to this node.</i> * @param defType_ the {@link PType} <b>graph</a> node for the {@code defType} child of this {@link AEqualsDefinition} node. * <i>The parent of this {@code defType } will not be changed by adding it to this node.</i> * @param defs_ the {@link NodeList} node for the {@code defs} child of this {@link AEqualsDefinition} node */ public AEqualsDefinition(ILexLocation location_, ILexNameToken name_, NameScope nameScope_, Boolean used_, SClassDefinition classDefinition_, AAccessSpecifierAccessSpecifier access_, PType type_, Pass pass_, PPattern pattern_, ATypeBind typebind_, ASetBind setbind_, ASeqBind seqbind_, PExp test_, PType expType_, PType defType_, List<? extends PDefinition> defs_) { super(location_,name_,nameScope_,used_,classDefinition_,access_,type_,pass_); this.setPattern(pattern_); this.setTypebind(typebind_); this.setSetbind(setbind_); this.setSeqbind(seqbind_); this.setTest(test_); this.setExpType(expType_); this.setDefType(defType_); this.setDefs(defs_); }
local.setPattern(pattern.clone()); local.setTest(exp.clone()); List<PDefinition> lDefs = new Vector<PDefinition>(); lDefs.add(local);
AVariableExp varExp = getVarExp(def.getName(), def.clone()); varExp.setType(def.getRecordType().clone()); local.setTest(varExp); invDefs.add(local); letExp.setLocalDefs(invDefs);