// Parse a range of tokens. Tree* Parser::operator()(Token_iterator f, Token_iterator l) { if (f == l) return nullptr; first = f; last = l; current = first; use_diagnostics(diags); return parse_program(*this); }
Tokens Lexer::operator()(File* file, Iterator f, Iterator l) { use_diagnostics(diags); first = f; last = l; loc = Location(file); while (first != last) lex(*this); return toks; }