コード例 #1
0
            public override void AddYieldTarget(YieldStmt ys, YieldTarget yt, CodeGen cg)
            {
                switch (state)
                {
                case State.Try:
                    cg.Context.AddError("cannot yield from try block with finally", ys);
                    break;

                case State.Finally:
                    stmt.AddYieldTarget(yt.FixForFinally(cg));
                    ys.label = yt.tryBranchTarget;
                    break;
                }
            }
コード例 #2
0
            public override void AddYieldTarget(YieldStmt ys, YieldTarget yt, CodeGen cg)
            {
                switch (state)
                {
                case State.Try:
                    stmt.AddYieldTarget(yt.FixForTry(cg));
                    ys.label = yt.tryBranchTarget;
                    break;

                case State.Handler:
                    stmt.yieldInExcept = true;
                    ys.label           = yt.topBranchTarget;
                    break;
                }
            }
コード例 #3
0
 public void AddYieldTarget(YieldTarget yt)
 {
     yieldTargets.Add(yt);
 }
コード例 #4
0
 public abstract void AddYieldTarget(YieldStmt ys, YieldTarget yt, CodeGen cg);