LibURL/Pattern: Add some scaffolding for the URLPattern constructor

This commit is contained in:
Shannon Booth 2025-03-01 14:43:15 +13:00 committed by Tim Flynn
commit ff07cc1a6c
Notes: github-actions[bot] 2025-03-04 21:53:00 +00:00
2 changed files with 86 additions and 0 deletions

View file

@ -12,6 +12,7 @@
#include <AK/Vector.h>
#include <LibURL/Pattern/Component.h>
#include <LibURL/Pattern/Init.h>
#include <LibURL/Pattern/PatternError.h>
namespace URL::Pattern {
@ -46,6 +47,8 @@ struct Result {
// https://urlpattern.spec.whatwg.org/#url-pattern
class Pattern {
public:
static PatternErrorOr<Pattern> create(Input const&, Optional<String> const& base_url = {}, Options const& = {});
bool has_regexp_groups() const;
Component const& protocol_component() const { return m_protocol_component; }