Exemplo n.º 1
0
        public static Query Parse(IEnumerable <string> lines)
        {
            var query = Benumerator.AsLongString(lines);

            var save = query.Save();

            return(Query.Parse(save));
        }
Exemplo n.º 2
0
        public void TestParseWord()
        {
            var en = Benumerator.AsLongString(new[] { "one ,two ,three" });

            en.MoveNext();

            Assert.AreEqual("one", SDB.Parser.ParseWord(en));
            SDB.Parser.SkipWhitespace(en);
            if (en.Current == ',')
            {
                en.MoveNext();
            }

            Assert.AreEqual("two", SDB.Parser.ParseWord(en));
            SDB.Parser.SkipWhitespace(en);
            if (en.Current == ',')
            {
                en.MoveNext();
            }

            Assert.AreEqual("three", SDB.Parser.ParseWord(en, true));
        }