diff options
author | Linus Groh <mail@linusgroh.de> | 2022-12-06 01:12:49 +0000 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-12-06 08:54:33 +0100 |
commit | 57dc179b1fce5d4b7171311b04667debfe693095 (patch) | |
tree | a459d1aef92dc4e49bbf03b32621b1e7e30d4e64 /Userland/Libraries/LibJS/Parser.cpp | |
parent | 6e19ab2bbce0b113b628e6f8e9b5c0640053933e (diff) | |
download | serenity-57dc179b1fce5d4b7171311b04667debfe693095.zip |
Everywhere: Rename to_{string => deprecated_string}() where applicable
This will make it easier to support both string types at the same time
while we convert code, and tracking down remaining uses.
One big exception is Value::to_string() in LibJS, where the name is
dictated by the ToString AO.
Diffstat (limited to 'Userland/Libraries/LibJS/Parser.cpp')
-rw-r--r-- | Userland/Libraries/LibJS/Parser.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibJS/Parser.cpp b/Userland/Libraries/LibJS/Parser.cpp index 774fedb506..bf5dfd21ea 100644 --- a/Userland/Libraries/LibJS/Parser.cpp +++ b/Userland/Libraries/LibJS/Parser.cpp @@ -1556,7 +1556,7 @@ NonnullRefPtr<RegExpLiteral> Parser::parse_regexp_literal() syntax_error(DeprecatedString::formatted("RegExp compile error: {}", Regex<ECMA262>(parsed_regex, parsed_pattern, parsed_flags).error_string()), rule_start.position()); SourceRange range { m_source_code, rule_start.position(), position() }; - return create_ast_node<RegExpLiteral>(move(range), move(parsed_regex), move(parsed_pattern), move(parsed_flags), pattern.to_string(), move(flags)); + return create_ast_node<RegExpLiteral>(move(range), move(parsed_regex), move(parsed_pattern), move(parsed_flags), pattern.to_deprecated_string(), move(flags)); } static bool is_simple_assignment_target(Expression const& expression, bool allow_web_reality_call_expression = true) @@ -4104,7 +4104,7 @@ ModuleRequest Parser::parse_module_request() while (!done() && !match(TokenType::CurlyClose)) { DeprecatedString key; if (match(TokenType::StringLiteral)) { - key = parse_string_literal(m_state.current_token)->value().to_string(); + key = parse_string_literal(m_state.current_token)->value().to_deprecated_string(); consume(); } else if (match_identifier_name()) { key = consume().value(); @@ -4120,7 +4120,7 @@ ModuleRequest Parser::parse_module_request() if (entries.key == key) syntax_error(DeprecatedString::formatted("Duplicate assertion clauses with name: {}", key)); } - request.add_assertion(move(key), parse_string_literal(m_state.current_token)->value().to_string()); + request.add_assertion(move(key), parse_string_literal(m_state.current_token)->value().to_deprecated_string()); } consume(TokenType::StringLiteral); |