Esempio n. 1
0
        public override void ExitContinueStatement(ContinueStatement continueStatement)
        {
            var loopStatement = continueStatement.NearestAncestorOfAnyType(typeof(ForStatement), typeof(ForeachStatement), typeof(WhileStatement));

            if (loopStatement == null)
            {
                Errors.Add(new CompilationError(continueStatement.Context, "Continue statements can only appear inside loops"));
            }
        }