public static Query Parse(IEnumerable <string> lines) { var query = Benumerator.AsLongString(lines); var save = query.Save(); return(Query.Parse(save)); }
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)); }