Represents the return keyword to cancel the current execution and return the given expression [if any].
Inheritance: BodyKeyword
示例#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;
 }
示例#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);
        }