Exemple #1
0
 public virtual object VisitArgumentNode(ArgumentNode argumentNode, object data)
 {
     stackMap.Push(argumentNode);
     argumentNode.Attributes.AcceptVisitor(this, data);
     argumentNode.Expression.AcceptVisitor(this, data);
     stackMap.Pop();
     return(null);
 }
Exemple #2
0
        private NodeCollection<ArgumentNode> ParseArgumentList()
        {
            NodeCollection<ArgumentNode> list = new NodeCollection<ArgumentNode>();
            if (curtok.ID == TokenID.RParen) return list;

            while (true)
            {
                ArgumentNode arg = new ArgumentNode(curtok);
                switch (curtok.ID)
                {
                    case TokenID.Out:
                        Advance();
                        arg.IsOut = true;
                        break;

                    case TokenID.Ref:
                        Advance();
                        arg.IsRef = true;
                        break;
                }
                arg.Expression = ParseExpression();
                list.Add(arg);
                if (curtok.ID != TokenID.Comma) break;
                Advance();
            }
            return list;
        }
Exemple #3
0
		private NodeCollection<ArgumentNode> ParseArgs()					
		{
			AssertAndAdvance(TokenID.LParen);
			if (curtok.ID == TokenID.RParen)
			{
				Advance();
				return null;
			}
			bool hasComma;
			NodeCollection<ArgumentNode> result = new NodeCollection<ArgumentNode>();
			do
			{
				ArgumentNode node = new ArgumentNode(curtok);
				result.Add(node);

				if (curtok.ID == TokenID.Ref)		
				{
					node.IsRef = true;
					Advance();
				}
				else if (curtok.ID == TokenID.Out)
				{
					node.IsOut = true;
					Advance();
				}
				node.Expression = ParseExpression();

				hasComma = false;
				if (curtok.ID == TokenID.Comma)
				{
					Advance();
					hasComma = true;
				}
			}
			while (hasComma);

			AssertAndAdvance(TokenID.RParen);

			return result;
		}
 public virtual object VisitArgumentNode(ArgumentNode argumentNode, object data)
 {
     stackMap.Push(argumentNode);
     argumentNode.Attributes.AcceptVisitor(this, data);
     argumentNode.Expression.AcceptVisitor( this,data );
     stackMap.Pop();
     return null;
 }