Esempio n. 1
0
        public CmdletNode(Parser theParser, AnyWordNode anyWord)
            : base(theParser)
        {
            CmdletName = anyWord.Text;

            Params = ParamsListNode.GetParamsList(theParser);
        }
Esempio n. 2
0
        public static ParamsListNode GetParamsList(Parser theParser)
        {
            ParamsListNode paramsList = null;

            if (theParser != null)
            {
                object objLeft = theParser.GetReductionSyntaxNode(0);
                object objRight = theParser.GetReductionSyntaxNode(1);

                if (objLeft is ParamsListNode)
                {
                    paramsList = (ParamsListNode)objLeft;
                    paramsList.AddParam(objRight);
                }
                else if (objRight is ParamsListNode)
                {
                    paramsList = (ParamsListNode)objRight;
                    paramsList.Insert(0, objLeft);
                }
            }

            if (paramsList == null)
            {
                paramsList = new ParamsListNode(theParser);

                if (theParser != null)
                {
                    paramsList.AddParamFromParser(theParser, 0);
                    paramsList.AddParamFromParser(theParser, 1);
                }
            }

            return paramsList;
        }
Esempio n. 3
0
        public static ParamsListNode GetParamsList(Parser theParser)
        {
            ParamsListNode paramsList = null;

            if (theParser != null)
            {
                object objLeft  = theParser.GetReductionSyntaxNode(0);
                object objRight = theParser.GetReductionSyntaxNode(1);

                if (objLeft is ParamsListNode)
                {
                    paramsList = (ParamsListNode)objLeft;
                    paramsList.AddParam(objRight);
                }
                else if (objRight is ParamsListNode)
                {
                    paramsList = (ParamsListNode)objRight;
                    paramsList.Insert(0, objLeft);
                }
            }

            if (paramsList == null)
            {
                paramsList = new ParamsListNode(theParser);

                if (theParser != null)
                {
                    paramsList.AddParamFromParser(theParser, 0);
                    paramsList.AddParamFromParser(theParser, 1);
                }
            }

            return(paramsList);
        }
Esempio n. 4
0
        public CmdletNode(Parser theParser)
            : base(theParser)
        {
            if (Token(theParser, 0) is AnyWordNode)
            {
                CmdletName = ((AnyWordNode)Token(theParser, 0)).Text;
            }

            Params = ParamsListNode.GetParamsListFromRight(theParser);
        }
Esempio n. 5
0
        public static ParamsListNode GetParamsListFromRight(Parser theParser)
        {
            object objRight = theParser.GetReductionSyntaxNode(1);

            ParamsListNode paramsList = null;
            if (objRight is ParamsListNode)
            {
                paramsList = (ParamsListNode)objRight;
            }
            else
            {
                paramsList = new ParamsListNode(theParser);
                paramsList.AddParamFromParser(theParser, 1);
            }

            return paramsList;
        }
Esempio n. 6
0
        public static ParamsListNode GetParamsListFromRight(Parser theParser)
        {
            object objRight = theParser.GetReductionSyntaxNode(1);

            ParamsListNode paramsList = null;

            if (objRight is ParamsListNode)
            {
                paramsList = (ParamsListNode)objRight;
            }
            else
            {
                paramsList = new ParamsListNode(theParser);
                paramsList.AddParamFromParser(theParser, 1);
            }

            return(paramsList);
        }
 // <cmletParamsList> ::= <ParameterArgumentToken> <cmletParamsList>
 partial void CreateRule_Rule_Cmletparamslist(Parser theParser, ASTNodeContainer astNode)
 {
     astNode.Node = ParamsListNode.GetParamsList(theParser);
 }
 // <ParameterArgumentToken> ::= <valueRule>
 partial void CreateRule_Rule_Parameterargumenttoken(Parser theParser, ASTNodeContainer astNode)
 {
     astNode.Node = ParamsListNode.GetParamsList(theParser);
 }