Example #1
0
        /// <summary>
        /// FIELDLIST
        ///     | FieldNode
        ///     | FieldNode, FIELDLIST
        /// </summary>
        /// <returns>AST FieldList Tree</returns>
        private FieldList FieldListRule()
        {
            FieldNode fieldNode = FieldRule();

            _token = _scanner.GetToken();

            if (_token.Ttype == TokenType.COMMA)
            {
                return(_astFactory.CreateFieldList(fieldNode, FieldListRule()));
            }

            return(_astFactory.CreateFieldList(fieldNode));
        }
Example #2
0
        public void CreateGroupBy_Field()
        {
            GroupBy groupBy = factory.CreateGroupBy(
                factory.CreateFieldList(
                    factory.CreateFieldNode("Test")));

            Assert.IsNotNull(groupBy);
            Assert.IsInstanceOfType(typeof(FieldList), groupBy.LeftNode);
            Assert.IsInstanceOfType(typeof(FieldNode), groupBy.LeftNode.LeftNode);
        }