public void AddEntryMethod(StateMachineMethod method) { if (this.method != null) { throw new InternalErrorException(); } this.method = method; Members.Add(method); }
protected override Expression DoResolve(ResolveContext rc) { var bc = (BlockContext)rc; var ctx = CreateBlockContext(bc); Block.Resolve(ctx); if (!rc.IsInProbingMode) { var move_next = new StateMachineMethod(storey, this, new TypeExpression(ReturnType, loc), Modifiers.PUBLIC, new MemberName("MoveNext", loc), 0); move_next.Block.AddStatement(new MoveNextBodyStatement(this)); storey.AddEntryMethod(move_next); } bc.AssignmentInfoOffset = ctx.AssignmentInfoOffset; eclass = ExprClass.Value; return(this); }
public GetEnumeratorStatement(IteratorStorey host, StateMachineMethod host_method) { this.host = host; this.host_method = host_method; loc = host_method.Location; }