diff options
author | Evan Smal <evan.smal@hotmail.com> | 2023-01-26 08:38:09 -0500 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2023-01-26 20:25:25 +0000 |
commit | cfa6b4d81547b7c109186e2db973344499e7f80a (patch) | |
tree | b4af97cf50b3ac85071cd8b20ddd53f523f6aae3 /Userland/Libraries/LibJS/Lexer.cpp | |
parent | 93674e4383f7ae664442d454a9317113f8fe578d (diff) | |
download | serenity-cfa6b4d81547b7c109186e2db973344499e7f80a.zip |
LibJS: Remove DeprecatedString usage from Token
Diffstat (limited to 'Userland/Libraries/LibJS/Lexer.cpp')
-rw-r--r-- | Userland/Libraries/LibJS/Lexer.cpp | 6 |
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, |