LibJS: Remove some usage of DeprecatedString usage from Lexer

This changes the filename member from DeprecatedString to String. Parser
has also been updated to meet the updated Lexer interface.
This commit is contained in:
Evan Smal 2023-01-26 08:40:21 -05:00 committed by Linus Groh
commit 3226ce3d83
Notes: sideshowbarker 2024-07-17 07:19:27 +09:00
3 changed files with 5 additions and 4 deletions

View file

@ -24,7 +24,7 @@ HashMap<char, TokenType> Lexer::s_single_char_tokens;
Lexer::Lexer(StringView source, StringView filename, size_t line_number, size_t line_column)
: m_source(source)
, m_current_token(TokenType::Eof, {}, {}, {}, filename, 0, 0, 0)
, m_filename(filename)
, m_filename(String::from_utf8(filename).release_value_but_fixme_should_propagate_errors())
, m_line_number(line_number)
, m_line_column(line_column)
, m_parsed_identifiers(adopt_ref(*new ParsedIdentifiers))