/** * Creates a new tree field only constructor {@code APerSyncDefinition TAG=perSync} 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 opname_ the {@link ILexNameToken} node for the {@code opname} child of this {@link APerSyncDefinition} node * @param guard_ the {@link PExp} node for the {@code guard} child of this {@link APerSyncDefinition} node */ public APerSyncDefinition(ILexLocation location_, NameScope nameScope_, Boolean used_, AAccessSpecifierAccessSpecifier access_, Pass pass_, ILexNameToken opname_, PExp guard_) { super(location_,null,nameScope_,used_,null,access_,null,pass_); this.setOpname(opname_); this.setGuard(guard_); }
/** * Creates a new complete constructor {@code APerSyncDefinition} 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 opname_ the {@link ILexNameToken} node for the {@code opname} child of this {@link APerSyncDefinition} node * @param guard_ the {@link PExp} node for the {@code guard} child of this {@link APerSyncDefinition} node */ public APerSyncDefinition(ILexLocation location_, ILexNameToken name_, NameScope nameScope_, Boolean used_, SClassDefinition classDefinition_, AAccessSpecifierAccessSpecifier access_, PType type_, Pass pass_, ILexNameToken opname_, PExp guard_) { super(location_,name_,nameScope_,used_,classDefinition_,access_,type_,pass_); this.setOpname(opname_); this.setGuard(guard_); }
public static APerSyncDefinition newAPerSyncDefinition( ILexLocation location, ILexNameToken opname, PExp guard) { APerSyncDefinition result = new APerSyncDefinition(); // Definition initialization initDefinition(result, Pass.DEFS, location, opname.getPerName(location), NameScope.GLOBAL); result.setOpname(opname); result.setGuard(guard); if(guard != null) { guard.parent(result); } return result; }