mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-10 18:19:03 +00:00
LibRegex: Make Match::capture_group_name an index into the string table
This removes another Match member that required destruction. The "API" for accessing the strings is definitely a bit awkward. We'll think of something nicer eventually.
This commit is contained in:
parent
9d47cc54f8
commit
54edf29f1b
Notes:
github-actions[bot]
2025-04-14 15:41:26 +00:00
Author: https://github.com/awesomekling
Commit: 54edf29f1b
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4351
5 changed files with 11 additions and 10 deletions
|
@ -489,9 +489,9 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
Match(RegexStringView const view_, StringView capture_group_name_, size_t const line_, size_t const column_, size_t const global_offset_)
|
||||
Match(RegexStringView const view_, size_t capture_group_name_, size_t const line_, size_t const column_, size_t const global_offset_)
|
||||
: view(view_)
|
||||
, capture_group_name(MUST(FlyString::from_utf8(capture_group_name_)))
|
||||
, capture_group_name(capture_group_name_)
|
||||
, line(line_)
|
||||
, column(column_)
|
||||
, global_offset(global_offset_)
|
||||
|
@ -510,7 +510,7 @@ public:
|
|||
}
|
||||
|
||||
RegexStringView view {};
|
||||
Optional<FlyString> capture_group_name {};
|
||||
Optional<size_t> capture_group_name {}; // This is a string table index.
|
||||
size_t line { 0 };
|
||||
size_t column { 0 };
|
||||
size_t global_offset { 0 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue