Represents the return keyword to cancel the current execution and return the given expression [if any].
Inheritance: BodyKeyword
Exemplo n.º 1
0
 public override Expression Scan(ParseEngine engine)
 {
     var start = engine.Pointer;
     var kw = new ReturnKeyword(engine.CurrentLine, engine.CurrentColumn, engine.Query);
     engine.Advance(Token.Length);
     kw.Body = engine.ParseStatement();
     kw.Body.IsMuted = false;
     kw.Length = engine.Pointer - start;
     return kw;
 }
Exemplo n.º 2
0
        public override Expression Scan(ParseEngine engine)
        {
            var start = engine.Pointer;
            var kw    = new ReturnKeyword(engine.CurrentLine, engine.CurrentColumn, engine.Query);

            engine.Advance(Token.Length);
            kw.Body         = engine.ParseStatement();
            kw.Body.IsMuted = false;
            kw.Length       = engine.Pointer - start;
            return(kw);
        }