mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-03 22:59:33 +00:00
LibJS: Implement null and undefined literals
This commit is contained in:
parent
7aad10d984
commit
cfd710eb31
Notes:
sideshowbarker
2024-07-19 08:16:59 +09:00
Author: https://github.com/0xtechnobabble
Commit: cfd710eb31
Pull-request: https://github.com/SerenityOS/serenity/pull/1470
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/oriko1010
6 changed files with 61 additions and 0 deletions
|
@ -60,6 +60,7 @@ Lexer::Lexer(StringView source)
|
|||
s_keywords.set("let", TokenType::Let);
|
||||
s_keywords.set("new", TokenType::New);
|
||||
s_keywords.set("null", TokenType::NullLiteral);
|
||||
s_keywords.set("undefined", TokenType::UndefinedLiteral);
|
||||
s_keywords.set("return", TokenType::Return);
|
||||
s_keywords.set("true", TokenType::BoolLiteral);
|
||||
s_keywords.set("try", TokenType::Try);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue