Beispiel #1
0
        /// <summary>
        /// run step 123.
        /// </summary>
        /// <returns></returns>
        public override Expr Parse()
        {
            _tokenIt.Advance();
            var name = _tokenIt.ExpectId(true, true);
            var expr = new PluginExpr();

            expr.Name = name;

            // 1. Push the new symbol scope
            Ctx.Symbols.Push(new SymbolsFunction(name), true);
            expr.SymScope = Ctx.Symbols.Current;

            // 2. Parse block
            _parser.ParseBlock(expr);

            // 3. Pop the last symbol scope.
            Ctx.Symbols.Pop();

            //this.Validate(expr);
            return(expr);
        }
Beispiel #2
0
        /// <summary>
        /// run step 123.
        /// </summary>
        /// <returns></returns>
        public override Expr Parse()
        {
            _tokenIt.Advance();
            var name = _tokenIt.ExpectId(true, true);
            var expr = new PluginExpr();
            expr.Name = name;

            // 1. Push the new symbol scope
            this.Ctx.Symbols.Push(new SymbolsFunction(name), true);
            expr.SymScope = this.Ctx.Symbols.Current;

            // 2. Parse block
            _parser.ParseBlock(expr);

            // 3. Pop the last symbol scope.
            this.Ctx.Symbols.Pop();

            //this.Validate(expr);
            return expr;
        }