Closed tjvr closed 5 years ago
Matcher
Lexer
Token
The Matcher change appears to make compilation ~8% slower, and lexing 5-8% slower. I'm not entirely sure why; I would have expected V8 to do a good job optimising and inlining this code.
Matcher
class, that contains all the matching logic. TheLexer
knows how to turn a Match into a token, and manage states etc.Token
class, instead of plain objects.