mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-05 15:49:11 +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
|
@ -839,7 +839,8 @@ public:
|
|||
ExecutionResult execute(MatchInput const& input, MatchState& state) const override;
|
||||
ALWAYS_INLINE OpCodeId opcode_id() const override { return OpCodeId::SaveRightNamedCaptureGroup; }
|
||||
ALWAYS_INLINE size_t size() const override { return 3; }
|
||||
ALWAYS_INLINE FlyString name() const { return m_bytecode->get_string(argument(0)); }
|
||||
ALWAYS_INLINE FlyString name() const { return m_bytecode->get_string(name_string_table_index()); }
|
||||
ALWAYS_INLINE size_t name_string_table_index() const { return argument(0); }
|
||||
ALWAYS_INLINE size_t length() const { return name().bytes_as_string_view().length(); }
|
||||
ALWAYS_INLINE size_t id() const { return argument(1); }
|
||||
ByteString arguments_string() const override
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue