public override Statement VisitAcquire(Acquire acquire){ if (@acquire == null) return null; if (@acquire.Condition != null) @acquire.ConditionFunction = new Construct(new Literal(SystemTypes.ThreadConditionDelegate, SystemTypes.Type), new ExpressionList(new AnonymousNestedFunction(null, new Block(new StatementList(new Return(@acquire.Condition)))))); Scope savedScope = this.scope; Scope scope = this.scope = @acquire.ScopeForTemporaryVariable = new BlockScope(savedScope, @acquire.Body); this.AddToAllScopes(this.scope); Declarer declarer = new Declarer(this.ErrorHandler); declarer.VisitAcquire(@acquire, scope); @acquire.Target = (Statement) this.Visit(@acquire.Target); @acquire.Condition = this.VisitExpression(@acquire.Condition); @acquire.ConditionFunction = this.VisitExpression(@acquire.ConditionFunction); @acquire.Body = this.VisitBlock(@acquire.Body); this.scope = savedScope; return @acquire; }