예제 #1
0
        public object VisitStatementStopTheLoop(StatementStopTheLoop statementStopTheLoop, object o)
        {
            var stopTheLoopAddress = (int)o;

            Emit(Machine.JUMPop, 0, Machine.CBr, stopTheLoopAddress);
            return(null);
        }
예제 #2
0
파일: Checker.cs 프로젝트: Laegas/CMC
        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);
        }