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; } }
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; } }
public void AddYieldTarget(YieldTarget yt) { yieldTargets.Add(yt); }
public abstract void AddYieldTarget(YieldStmt ys, YieldTarget yt, CodeGen cg);