Lexes the whole input (without the final EOF token).
List<Token> tokenize() { final tokens = <Token>[]; while (true) { final t = next(); if (t.isEof) return tokens; tokens.add(t); } }