LibURL/Pattern: Stub out URL::Pattern::match

This will allow us to complete the IDL interface, which will leave
remaining work to implement the URL pattern specification within
LibURL.
This commit is contained in:
Shannon Booth 2025-03-01 18:43:21 +13:00 committed by Tim Flynn
parent ba93e2a8a3
commit 10b32a8dd8
Notes: github-actions[bot] 2025-03-04 21:52:46 +00:00
2 changed files with 9 additions and 0 deletions

View file

@ -91,6 +91,13 @@ PatternErrorOr<Pattern> Pattern::create(Input const& input, Optional<String> con
return url_pattern;
}
// https://urlpattern.spec.whatwg.org/#url-pattern-match
PatternErrorOr<Optional<Result>> Pattern::match(Input const&, Optional<String> const&) const
{
dbgln("FIXME: Implement URL::Pattern::match");
return OptionalNone {};
}
// https://urlpattern.spec.whatwg.org/#url-pattern-has-regexp-groups
bool Pattern::has_regexp_groups() const
{

View file

@ -49,6 +49,8 @@ class Pattern {
public:
static PatternErrorOr<Pattern> create(Input const&, Optional<String> const& base_url = {}, Options const& = {});
PatternErrorOr<Optional<Result>> match(Input const&, Optional<String> const& base_url_string) const;
bool has_regexp_groups() const;
Component const& protocol_component() const { return m_protocol_component; }