mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +00:00
LibJS: Add support for arrow functions
This commit is contained in:
parent
f90da71d28
commit
098f1cd0ca
Notes:
sideshowbarker
2024-07-19 08:03:01 +09:00
Author: https://github.com/jack-karamanian
Commit: 098f1cd0ca
Pull-request: https://github.com/SerenityOS/serenity/pull/1532
Reviewed-by: https://github.com/awesomekling
5 changed files with 144 additions and 1 deletions
|
@ -86,6 +86,7 @@ Lexer::Lexer(StringView source)
|
|||
}
|
||||
|
||||
if (s_two_char_tokens.is_empty()) {
|
||||
s_two_char_tokens.set("=>", TokenType::Arrow);
|
||||
s_two_char_tokens.set("+=", TokenType::PlusEquals);
|
||||
s_two_char_tokens.set("-=", TokenType::MinusEquals);
|
||||
s_two_char_tokens.set("*=", TokenType::AsteriskEquals);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue