示例#1
0
        public virtual object VisitAnonymousMethodExpression(AnonymousMethodNode anonymousMethodExpression, object data)
        {
            stackMap.Push(anonymousMethodExpression);

            if (anonymousMethodExpression.Parameters != null)
            {
                anonymousMethodExpression.Parameters.AcceptVisitor(this, data);
            }
            anonymousMethodExpression.StatementBlock.AcceptVisitor(this, data);

            stackMap.Pop();
            return(null);
        }
示例#2
0
        private AnonymousMethodNode ParseAnonymousMethod()
        {
            AnonymousMethodNode ret = new AnonymousMethodNode(curtok);

            isAnonymous++;

            if (curtok.ID == TokenID.LParen)
            {
                ret.Parameters = ParseParamList();
                if (ret.Parameters == null)
                    ret.Parameters = new NodeCollection<ParamDeclNode>();
            }

            ParseBlock(ret.StatementBlock);

            isAnonymous--;

            return ret;
        }
示例#3
0
        private void ParseAnonymousMethod()
        {
            AnonymousMethodNode ret = new AnonymousMethodNode(curtok);

            isAnonynous++;

            if (curtok.ID == TokenID.LParen)
            {
                ret.Params = ParseParamList();
            }

            ParseBlock(ret.StatementBlock);

            isAnonynous--;

            exprStack.Push(ret);
        }
        public virtual object VisitAnonymousMethodExpression(AnonymousMethodNode anonymousMethodExpression, object data)
        {
            stackMap.Push(anonymousMethodExpression);
            anonymousMethodExpression.Params.AcceptVisitor(this, data);
             anonymousMethodExpression.StatementBlock.AcceptVisitor(this, data);

             stackMap.Pop();
             return null;

        }