summaryrefslogtreecommitdiff
path: root/Libraries/LibJS/Lexer.cpp
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2020-05-04 22:34:45 +0100
committerAndreas Kling <kling@serenityos.org>2020-05-05 11:12:27 +0200
commit3e754a15d48e094bfaa6ce4faf4eb1bb1a07399a (patch)
treece867e166b1a14257429b0dfdda8e38c4998b5ec /Libraries/LibJS/Lexer.cpp
parent8e4301dea610850b847f92737de09f030e4efac7 (diff)
downloadserenity-3e754a15d48e094bfaa6ce4faf4eb1bb1a07399a.zip
LibJS: Implement bitwise assignment operators (&=, |=, ^=)
Diffstat (limited to 'Libraries/LibJS/Lexer.cpp')
-rw-r--r--Libraries/LibJS/Lexer.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/Libraries/LibJS/Lexer.cpp b/Libraries/LibJS/Lexer.cpp
index 1c5c17046c..388ec424da 100644
--- a/Libraries/LibJS/Lexer.cpp
+++ b/Libraries/LibJS/Lexer.cpp
@@ -97,6 +97,7 @@ Lexer::Lexer(StringView source)
s_two_char_tokens.set("%=", TokenType::PercentEquals);
s_two_char_tokens.set("&=", TokenType::AmpersandEquals);
s_two_char_tokens.set("|=", TokenType::PipeEquals);
+ s_two_char_tokens.set("^=", TokenType::CaretEquals);
s_two_char_tokens.set("&&", TokenType::DoubleAmpersand);
s_two_char_tokens.set("||", TokenType::DoublePipe);
s_two_char_tokens.set("??", TokenType::DoubleQuestionMark);