binaryen
binaryen copied to clipboard
[Parser] Simplify the lexer interface
The lexer was previously an iterator over tokens, but that expressivity is not
actually used in the parser. Instead, we have input.h that adapts the token
iterator interface into an iterface that is actually useful.
As a first step toward simplifying the lexer implementation to no longer be an iterator over tokens, update its interface by moving the adaptation from input.h to the lexer itself. This requires extensive changes to the lexer unit tests, which will not have to change further when we actually simplify the lexer implementation.
Going to go ahead and land this despite the unrelated emscripten failure.
