Boo.Lang.Compiler.Steps.GeneratorMethodProcessor.LeaveYieldStatement C# (CSharp) Метод

LeaveYieldStatement() публичный Метод

public LeaveYieldStatement ( Boo.Lang.Compiler.Ast.YieldStatement node ) : void
node Boo.Lang.Compiler.Ast.YieldStatement
Результат void
        public override void LeaveYieldStatement(YieldStatement node)
        {
            TryStatementInfo currentTry = (_tryStatementStack.Count > 0) ? _tryStatementStack.Peek() : null;
            if (currentTry != null) {
                ConvertTryStatement(currentTry);
            }
            Block block = new Block();
            block.Add(
                new ReturnStatement(
                    node.LexicalInfo,
                    CreateYieldInvocation(node.Expression, _labels.Count),
                    null));
            block.Add(CreateLabel(node));
            // setting the state back to the "running" state not required, as that state has the same ensure blocks
            // as the state we are currently in.
            //			if (currentTry != null) {
            //				block.Add(SetStateTo(currentTry._stateNumber));
            //			}
            ReplaceCurrentNode(block);
        }