mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +00:00
LibURL/Pattern: Implement ability to compile a component
This provides the infrastructure for taking a part list from the pattern parser and generating the actual regexp object which is used for matching against URLs from the pattern.
This commit is contained in:
parent
934f1ec30d
commit
c9e6ad562c
Notes:
github-actions[bot]
2025-04-06 12:27:29 +00:00
Author: https://github.com/shannonbooth
Commit: c9e6ad562c
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3847
Reviewed-by: https://github.com/trflynn89
3 changed files with 261 additions and 0 deletions
|
@ -9,6 +9,7 @@
|
|||
#include <AK/OwnPtr.h>
|
||||
#include <AK/String.h>
|
||||
#include <LibRegex/Regex.h>
|
||||
#include <LibURL/Pattern/PatternParser.h>
|
||||
|
||||
namespace URL::Pattern {
|
||||
|
||||
|
@ -29,6 +30,8 @@ struct Component {
|
|||
// https://urlpattern.spec.whatwg.org/#component-has-regexp-groups
|
||||
// has regexp groups, a boolean
|
||||
bool has_regexp_groups {};
|
||||
|
||||
static PatternErrorOr<Component> compile(Utf8View const& input, PatternParser::EncodingCallback, Options const&);
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue