Beispiel #1
0
 public Expr OnParseContinue()
 {
     var tokenIt = this._parser.TokenIt;
     var initiatorToken = tokenIt.NextToken;
     var expr = new ContinueExpr();
     // <codeContinue>
     tokenIt.Advance();
     // </codeContinue>
     this._parser.SetupContext(expr, initiatorToken);
     return expr;
 }
Beispiel #2
0
        /// <summary>
        /// Execute the continue.
        /// </summary>
        public object VisitContinue(ContinueExpr expr)
        {
            var loop = expr.FindParent<ILoop>();
            if (loop == null) throw new LangException("syntax error", "unable to break, loop not found", string.Empty, 0);

            loop.DoContinueLoop = true;
            return LObjects.Null;
        }
Beispiel #3
0
 /// <summary>
 /// Visits the var statement tree.
 /// </summary>
 /// <param name="expr"></param>
 public object VisitContinue(ContinueExpr expr)
 {
     _callBackOnNodeStart(expr);
     return null;
 }