From 8bde4e94d874e2b741ed65a5447e132915eead34 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 18 Sep 2021 18:34:51 +0200 Subject: LibJS: Make Lexer::s_keywords store keywords as FlyString This allows O(1) comparison against lexed keywords, since we lex to FlyString. --- Userland/Libraries/LibJS/Lexer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Userland/Libraries/LibJS/Lexer.cpp') diff --git a/Userland/Libraries/LibJS/Lexer.cpp b/Userland/Libraries/LibJS/Lexer.cpp index 7b58a84f32..f9c0d31de7 100644 --- a/Userland/Libraries/LibJS/Lexer.cpp +++ b/Userland/Libraries/LibJS/Lexer.cpp @@ -16,7 +16,7 @@ namespace JS { -HashMap Lexer::s_keywords; +HashMap Lexer::s_keywords; HashMap Lexer::s_three_char_tokens; HashMap Lexer::s_two_char_tokens; HashMap Lexer::s_single_char_tokens; -- cgit v1.2.3