public void Visit(ASTree t, IEnvironment env) { if (debug) { System.Console.WriteLine("ASTree: " + t.GetType().ToString()); } result = new ErrorValue("cannot eval: [ASTree]"); return; }
public void Parse(Lexer lexer, List <ASTree> res) { while (parser.Match(lexer)) { ASTree tree = parser.Parse(lexer); if (tree.GetType() != typeof(ASTList) || tree.NumChildren() > 0) { res.Add(tree); } if (onlyOnce) { break; } } }
public override void Parse(ILexer lexer, List <ASTree> res) { while (parser.Match(lexer)) { ASTree t = parser.parse(lexer); if (t.GetType() != typeof(ASTList) || t.NumChildern > 0) { res.Add(t); } if (onlyOnce) { break; } } }