1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 02:57:44 +00:00

AK+Everywhere: Rename FlyString to DeprecatedFlyString

DeprecatedFlyString relies heavily on DeprecatedString's StringImpl, so
let's rename it to A) match the name of DeprecatedString, B) write a new
FlyString class that is tied to String.
This commit is contained in:
Timothy Flynn 2023-01-08 19:23:00 -05:00 committed by Linus Groh
parent 2eacc7aec1
commit f3db548a3d
316 changed files with 1177 additions and 1177 deletions

View file

@ -9,8 +9,8 @@
#include "Forward.h"
#include "RegexOptions.h"
#include <AK/DeprecatedFlyString.h>
#include <AK/DeprecatedString.h>
#include <AK/FlyString.h>
#include <AK/HashMap.h>
#include <AK/MemMem.h>
#include <AK/RedBlackTree.h>
@ -558,7 +558,7 @@ private:
class Match final {
private:
Optional<FlyString> string;
Optional<DeprecatedFlyString> string;
public:
Match() = default;
@ -603,7 +603,7 @@ public:
}
RegexStringView view {};
Optional<FlyString> capture_group_name {};
Optional<DeprecatedFlyString> capture_group_name {};
size_t line { 0 };
size_t column { 0 };
size_t global_offset { 0 };

View file

@ -2427,7 +2427,7 @@ bool ECMA262Parser::parse_unicode_property_escape(PropertyEscape& property, bool
[](Empty&) -> bool { VERIFY_NOT_REACHED(); });
}
FlyString ECMA262Parser::read_capture_group_specifier(bool take_starting_angle_bracket)
DeprecatedFlyString ECMA262Parser::read_capture_group_specifier(bool take_starting_angle_bracket)
{
static auto id_start_category = Unicode::property_from_string("ID_Start"sv);
static auto id_continue_category = Unicode::property_from_string("ID_Continue"sv);
@ -2530,7 +2530,7 @@ FlyString ECMA262Parser::read_capture_group_specifier(bool take_starting_angle_b
builder.append_code_point(code_point);
}
FlyString name = builder.build();
DeprecatedFlyString name = builder.build();
if (!hit_end || name.is_empty())
set_error(Error::InvalidNameForCaptureGroup);

View file

@ -53,7 +53,7 @@ public:
size_t match_length_minimum;
Error error;
Token error_token;
Vector<FlyString> capture_groups;
Vector<DeprecatedFlyString> capture_groups;
AllOptions options;
};
@ -111,7 +111,7 @@ protected:
size_t repetition_mark_count { 0 };
AllOptions regex_options;
HashMap<int, size_t> capture_group_minimum_lengths;
HashMap<FlyString, NamedCaptureGroup> named_capture_groups;
HashMap<DeprecatedFlyString, NamedCaptureGroup> named_capture_groups;
explicit ParserState(Lexer& lexer)
: lexer(lexer)
@ -234,7 +234,7 @@ private:
};
StringView read_digits_as_string(ReadDigitsInitialZeroState initial_zero = ReadDigitsInitialZeroState::Allow, bool hex = false, int max_count = -1, int min_count = -1);
Optional<unsigned> read_digits(ReadDigitsInitialZeroState initial_zero = ReadDigitsInitialZeroState::Allow, bool hex = false, int max_count = -1, int min_count = -1);
FlyString read_capture_group_specifier(bool take_starting_angle_bracket = false);
DeprecatedFlyString read_capture_group_specifier(bool take_starting_angle_bracket = false);
struct Script {
Unicode::Script script {};