示例#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));
        }
示例#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));
        }