Пример #1
0
        public object VisitStatementStopTheLoop(StatementStopTheLoop statementStopTheLoop, object o)
        {
            var stopTheLoopAddress = (int)o;

            Emit(Machine.JUMPop, 0, Machine.CBr, stopTheLoopAddress);
            return(null);
        }
Пример #2
0
        public object VisitStatementStopTheLoop(StatementStopTheLoop statementStopTheLoop, object o)
        {
            if (!idTable.IsInLoopScope())
            {
                throw new Exception("Stop the loop statement must be used only inside a loop");
            }

            return(null);
        }