Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement URLPattern #785

Open
wants to merge 115 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
b963c09
implement URLPattern skeleton
anonrig Nov 30, 2024
668f950
use correct value for clang-format
anonrig Nov 30, 2024
f0cfe7b
fix build errors
anonrig Nov 30, 2024
9772f44
create url_pattern-inl.h
anonrig Nov 30, 2024
d0abcff
add canonicalize methods
anonrig Dec 4, 2024
8e7ac7c
add ada::parse_url_pattern function
anonrig Dec 4, 2024
62eba64
add more comments
anonrig Dec 4, 2024
f2a1b1d
implement getters
anonrig Dec 4, 2024
ee48e30
add has_regexp_groups()
anonrig Dec 4, 2024
615f1ef
start implementing tokenizer & tokenize
anonrig Dec 4, 2024
5a27a07
add initial parser_url_pattern method
anonrig Dec 4, 2024
6634c09
add todos and remove redundant qualifiers
anonrig Dec 4, 2024
e1ea3a1
implement escape pattern
anonrig Dec 4, 2024
a5ffd39
add CompileComponentOptions
anonrig Dec 7, 2024
9899579
minor fixes for add-url-pattern (#800)
lemire Dec 8, 2024
7c40686
rename commits
anonrig Dec 8, 2024
ce624cd
add more parse_url_pattern
anonrig Dec 9, 2024
d1b3af1
rename url_pattern class
anonrig Dec 9, 2024
b8b2d4d
complete parse_url_pattern implementation
anonrig Dec 9, 2024
770a221
add `_component` suffix to components
anonrig Dec 9, 2024
66d2a67
remove unnecessary void
anonrig Dec 9, 2024
af903a1
implement generate regular expression methods
anonrig Dec 10, 2024
2df15e8
continue working on parser
anonrig Dec 10, 2024
22295d4
fix build error
anonrig Dec 12, 2024
5a66288
implement constructor string parser
anonrig Dec 12, 2024
f72fb07
implement all of tokenizer's functions
anonrig Dec 12, 2024
b424fd7
fix build errors
anonrig Dec 12, 2024
62f17fa
fix warnings
anonrig Dec 12, 2024
e18f51e
complete tokenizer
anonrig Dec 12, 2024
ab16828
implement escape_regexp_string
anonrig Dec 12, 2024
95c15f5
implement generate_pattern_string
anonrig Dec 12, 2024
a036101
fix compiler warnings
anonrig Dec 12, 2024
2e4b005
semi-implement match
anonrig Dec 13, 2024
0117444
complete one more todo
anonrig Dec 13, 2024
3bdb85c
simplify create_component_match_result
anonrig Dec 13, 2024
f5f408d
simplify
anonrig Dec 13, 2024
72a7527
use correct inputs for match/exec/test
anonrig Dec 13, 2024
6c0a11b
rename wpt_tests to wpt_url_tests
anonrig Dec 13, 2024
3c913be
add wpt_urlpattern_tests skeleton
anonrig Dec 13, 2024
69252c6
add first test
anonrig Dec 14, 2024
c8f4349
Build fixes (#801)
lemire Dec 14, 2024
d8d9225
fix 2 bugs
anonrig Dec 14, 2024
4191ee2
fix linter issues
anonrig Dec 14, 2024
fdf3b7a
fix 2 more bugs
anonrig Dec 14, 2024
47e6821
more progress on missing features
anonrig Dec 16, 2024
a584048
move url_pattern_helpers to separate file
anonrig Dec 16, 2024
c9edd50
fix build errors
anonrig Dec 16, 2024
a6d05ca
use url_pattern_encoding_callback
anonrig Dec 17, 2024
1193220
fix url pattern constructor error
anonrig Dec 17, 2024
c41af3f
fix more issues
anonrig Dec 17, 2024
71a5cd6
add initial version of wpt test runner
anonrig Dec 17, 2024
9c8035c
simplify json logic (#802)
lemire Dec 17, 2024
03a3406
add fuzzer
anonrig Dec 17, 2024
fdf74ba
removing the reset
lemire Dec 17, 2024
22fefea
update ada idna
anonrig Dec 18, 2024
616072b
use ada idna method for valid name code point
anonrig Dec 18, 2024
15da643
fix add part implementation
anonrig Dec 18, 2024
2d29dae
fix invalid access errors
anonrig Dec 18, 2024
53c28fe
implement tests correctly
anonrig Dec 18, 2024
f975719
improve test runner
anonrig Dec 18, 2024
ca16819
add url_pattern_init to_string() method
anonrig Dec 19, 2024
b692611
update WPT tests
anonrig Dec 19, 2024
600f981
fix last remaining todo
anonrig Dec 19, 2024
50d5ca5
simplify test runner
anonrig Dec 19, 2024
8456d16
minor fixes
lemire Dec 19, 2024
faffe57
some reworking
lemire Dec 19, 2024
8c153d7
make sure to skip invalid tests
anonrig Dec 19, 2024
4986212
remove std::ranges::iota due to clang
anonrig Dec 20, 2024
f57c131
add more fuzzing coverage
anonrig Dec 20, 2024
afb5c6b
try to fix windows issues
anonrig Dec 20, 2024
32e67d6
remove unnecessary copy
anonrig Dec 20, 2024
26075ab
start testing the validity of the correct responses
anonrig Dec 20, 2024
46133ec
fix couple of bugs
anonrig Dec 20, 2024
f1f36ab
fix invalid ascii checks
anonrig Dec 20, 2024
d74c6fe
make pattern generation more verbose
anonrig Dec 20, 2024
aff51cf
fix regex error
anonrig Dec 20, 2024
0062fd2
remove semicolon due to -Werror,-Wextra-semi
anonrig Dec 20, 2024
776f670
guarding regex call (#805)
lemire Dec 20, 2024
5a2e4ee
add more logging
anonrig Dec 23, 2024
fe256d7
change ada_idna to char32_t
anonrig Dec 23, 2024
1c092f6
remove try/catch
anonrig Dec 23, 2024
c0a22da
make canonicalize_ methods more flexible
anonrig Dec 23, 2024
384f035
fix change_state
anonrig Dec 23, 2024
65aa110
fix invalid substr call
anonrig Dec 23, 2024
8b1021e
fix generate_pattern_string impl
anonrig Dec 23, 2024
b01a0be
fix more small issues
anonrig Dec 23, 2024
b8392e4
improve url_pattern_init::process
anonrig Dec 23, 2024
ae728f1
correctly computing the next code point (#808)
lemire Dec 23, 2024
2d594ea
use std string view to avoid copy
anonrig Dec 23, 2024
5063bfa
use next_index instead of index
anonrig Dec 23, 2024
e772c8c
adding checks
lemire Dec 23, 2024
0e018e8
Merge branch 'yagiz/add-url-pattern' of https://github.com/ada-url/ad…
lemire Dec 23, 2024
8e284ef
highlight the error message
anonrig Dec 23, 2024
13b2f79
better decoding
lemire Dec 23, 2024
8586b04
I think that the test is in error (#810)
lemire Dec 23, 2024
d17f000
remove invalid WPT test data
anonrig Dec 24, 2024
666d41e
remove invalid assertion
anonrig Dec 24, 2024
e8a1b23
fix ipv6 address canonicalize
anonrig Dec 24, 2024
41ec170
fix canonicalize_ipv6_hostname
anonrig Dec 24, 2024
cf42ab6
simplify test runner
anonrig Dec 24, 2024
b35eb1a
fix test runner
anonrig Dec 24, 2024
22103f4
add a todo
anonrig Dec 24, 2024
0eb3e3c
remove invalid test case
anonrig Dec 24, 2024
8744150
add tests for expected object
anonrig Dec 24, 2024
86c06bf
fix hostname tests
anonrig Dec 25, 2024
fbf9a4b
complete match implementation
anonrig Dec 25, 2024
7393441
fix empty component tests
anonrig Dec 26, 2024
99da6e7
revert some wpt changes
anonrig Dec 26, 2024
2730b70
add some optional result logging (#812)
lemire Dec 26, 2024
ae17a77
Merge branch 'main' into yagiz/add-url-pattern
lemire Dec 26, 2024
5ef18a3
lint
lemire Dec 26, 2024
d9e8097
fixing logging
lemire Dec 26, 2024
b6b2ec9
removing diagram printout
Dec 27, 2024
bd8ac45
fix asan build errors
anonrig Dec 28, 2024
f3d65c0
simpler version of the yagiz/add-url-pattern branch (#815)
lemire Dec 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions include/ada/url_pattern.h
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,8 @@ class url_pattern_component {

private:
std::string pattern{};
std::regex_constants::syntax_option_type flags{};
std::regex regexp{};
std::regex_constants::syntax_option_type flags = std::regex::ECMAScript;
std::regex regexp{"*"};
anonrig marked this conversation as resolved.
Show resolved Hide resolved
std::vector<std::string> group_name_list{};

bool has_regexp_groups_ = false;
Expand Down
Loading