mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibURL/Pattern: Implement generating a component match result
This commit is contained in:
parent
e35555f00e
commit
2a44420e52
Notes:
github-actions[bot]
2025-04-06 12:27:13 +00:00
Author: https://github.com/shannonbooth
Commit: 2a44420e52
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3847
Reviewed-by: https://github.com/trflynn89
3 changed files with 55 additions and 16 deletions
|
@ -19,24 +19,18 @@ namespace URL::Pattern {
|
|||
// https://urlpattern.spec.whatwg.org/#typedefdef-urlpatterninput
|
||||
using Input = Variant<String, Init>;
|
||||
|
||||
// https://urlpattern.spec.whatwg.org/#dictdef-urlpatterncomponentresult
|
||||
struct ComponentResult {
|
||||
String input;
|
||||
OrderedHashMap<String, Variant<String, Empty>> groups;
|
||||
};
|
||||
|
||||
// https://urlpattern.spec.whatwg.org/#dictdef-urlpatternresult
|
||||
struct Result {
|
||||
Vector<Input> inputs;
|
||||
|
||||
ComponentResult protocol;
|
||||
ComponentResult username;
|
||||
ComponentResult password;
|
||||
ComponentResult hostname;
|
||||
ComponentResult port;
|
||||
ComponentResult pathname;
|
||||
ComponentResult search;
|
||||
ComponentResult hash;
|
||||
Component::Result protocol;
|
||||
Component::Result username;
|
||||
Component::Result password;
|
||||
Component::Result hostname;
|
||||
Component::Result port;
|
||||
Component::Result pathname;
|
||||
Component::Result search;
|
||||
Component::Result hash;
|
||||
};
|
||||
|
||||
// https://urlpattern.spec.whatwg.org/#dictdef-urlpatternoptions
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue