1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 08:18:12 +00:00

LibJS: Make Lexer::s_keywords store keywords as FlyString

This allows O(1) comparison against lexed keywords, since we lex to
FlyString.
This commit is contained in:
Andreas Kling 2021-09-18 18:34:51 +02:00
parent bf46845819
commit 8bde4e94d8
2 changed files with 2 additions and 2 deletions

View file

@ -16,7 +16,7 @@
namespace JS {
HashMap<String, TokenType> Lexer::s_keywords;
HashMap<FlyString, TokenType> Lexer::s_keywords;
HashMap<String, TokenType> Lexer::s_three_char_tokens;
HashMap<String, TokenType> Lexer::s_two_char_tokens;
HashMap<char, TokenType> Lexer::s_single_char_tokens;