public void TestForNodeWithColon() { string t = "#{:for i in array[1 : 10]:}"; LexicalParser lp = new LexicalParser(); lp.SetParseContent(t); var tokens = lp.Parse(); ForNode f = new ForNode(tokens[0]); }
public void TestForNodeInvalidVarName() { string t = "#{for $ in array[1, 2, 3]}"; LexicalParser lp = new LexicalParser(); lp.SetParseContent(t); var tokens = lp.Parse(); ForNode f = new ForNode(tokens[0]); }
public void TestForNodeLackInKeyword() { string t = "#{for i array[1, 2, 3]}"; LexicalParser lp = new LexicalParser(); lp.SetParseContent(t); var tokens = lp.Parse(); ForNode f = new ForNode(tokens[0]); }
public void TestForNode() { string t = "#{ for i in array[3 :8]}#{i }#{end}"; LexicalParser lp = new LexicalParser(); lp.SetParseContent(t); var tokens = lp.Parse(); ForNode f = new ForNode(tokens[0]); Assert.AreEqual("i", f.Var); Assert.AreEqual("array[3 :8]", f.Enumerable); }