Exemplo n.º 1
0
        public override DLR.Expression GenerateExpressionTree(GenScope scope)
        {
            var loop = scope.GetFirstLoopScope();

            if (loop is null)
            {
                throw new InvalidOperationException("No enclosing loop to break out of.");
            }

            return(DLR.Expression.Break(loop.BreakTarget));
        }
Exemplo n.º 2
0
        public override DLR.Expression GenerateExpressionTree(GenScope scope)
        {
            var loop = scope.GetFirstLoopScope();

            if (loop is null)
            {
                throw new InvalidOperationException("No enclosing loop to continue from.");
            }

            return(DLR.Expression.Continue(loop.ContinueTarget));
        }