summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Lexer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibJS/Lexer.cpp')
-rw-r--r--Userland/Libraries/LibJS/Lexer.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibJS/Lexer.cpp b/Userland/Libraries/LibJS/Lexer.cpp
index ee3deb2517..366fe8948c 100644
--- a/Userland/Libraries/LibJS/Lexer.cpp
+++ b/Userland/Libraries/LibJS/Lexer.cpp
@@ -836,7 +836,7 @@ Token Lexer::next()
if (m_hit_invalid_unicode.has_value()) {
value_start = m_hit_invalid_unicode.value() - 1;
- m_current_token = Token(TokenType::Invalid, "Invalid unicode codepoint in source",
+ m_current_token = Token(TokenType::Invalid, String::from_utf8("Invalid unicode codepoint in source"sv).release_value_but_fixme_should_propagate_errors(),
""sv, // Since the invalid unicode can occur anywhere in the current token the trivia is not correct
m_source.substring_view(value_start + 1, min(4u, m_source.length() - value_start - 2)),
m_filename,
@@ -849,7 +849,7 @@ Token Lexer::next()
} else {
m_current_token = Token(
token_type,
- token_message,
+ String::from_deprecated_string(token_message).release_value_but_fixme_should_propagate_errors(),
m_source.substring_view(trivia_start - 1, value_start - trivia_start),
m_source.substring_view(value_start - 1, m_position - value_start),
m_filename,
@@ -893,7 +893,7 @@ Token Lexer::force_slash_as_regex()
m_current_token = Token(
token_type,
- "",
+ String {},
m_current_token.trivia(),
m_source.substring_view(value_start - 1, m_position - value_start),
m_filename,