Ben Noordhuis
f0ef9e1593
Implement RegExp 'v' flag, part 1 ( #229 )
...
This commit implements the flag itself and teaches the regex engine to
reject previously accepted patterns when in unicodeSets mode.
Refs: https://github.com/quickjs-ng/quickjs/issues/228
2023-12-21 19:37:31 +01:00
Ben Noordhuis
f6ed206bd5
Change regexp flags field from uint8 to uint16 ( #185 )
...
I need the extra bits to store the 'v' flag as described in
https://github.com/tc39/proposal-regexp-v-flag
2023-12-09 16:47:05 +01:00
Ben Noordhuis
f7d2169999
Rename LRE_FLAG_UTF16 to LRE_FLAG_UNICODE ( #186 )
...
Prep work for https://github.com/tc39/proposal-regexp-v-flag a.k.a.
UnicodeSets.
2023-12-08 10:58:00 +01:00
Ben Noordhuis
42b708622c
Use named constant for regexp bytecode size field ( #183 )
2023-12-07 23:00:32 +01:00
Linus Groh
3b034b84d9
Fix null pointer arithmetic UB in libregexp ( #136 )
...
This is a patch I originally wrote for the Kiesel JS engine:
https://codeberg.org/kiesel-js/kiesel/src/branch/main/patches/libregexp.patch
2023-11-29 14:43:02 +01:00
Ben Noordhuis
5c3077e091
Implement RegExp serialization ( #153 )
...
JS_WriteObject() and JS_ReadObject() now support RegExp objects.
2023-11-29 08:50:53 +01:00
Saúl Ibarra Corretgé
a721bda7b5
Drop CONFIG_ALL_UNICODE and enable it by default
2023-11-20 10:52:04 +01:00
Ben Noordhuis
bef2a12566
DRY surrogate pair handling ( #95 )
2023-11-20 09:46:02 +01:00
Ben Noordhuis
d1960d1bfe
Implement RegExp 'd' flag ( #86 )
2023-11-20 09:45:44 +01:00
Ben Noordhuis
e2bc6441f8
Optimize RegExp ASCII literal matching ( #94 )
...
Add REOP_char8 that matches single bytes. Compresses bytecode for the
ASCII common case by 33% and reduces regexp_ascii benchmark running time
by 4%. The regexp_utf16 benchmark is unaffected.
2023-11-19 17:26:45 +01:00
Ben Noordhuis
b56cbb143c
Implement extended named capture group identifiers ( #90 )
...
Perfectly reasonable and not at all uncommon regular expressions like
/(?<𝑓𝑜𝑥>fox).*(?<𝓓𝓸𝓰>dog)/ are now accepted.
2023-11-19 11:01:38 +01:00
Ben Noordhuis
162a8b7409
Remove trailing whitespace ( #46 )
...
Not purely cosmetic because it breaks navigation with { and } in the
One True Editor.
2023-11-12 10:01:40 +01:00
bellard
b1f67dfc1a
2020-11-08 release
2020-11-08 14:30:56 +01:00
bellard
7c312df422
2020-09-06 release
2020-09-06 19:10:15 +02:00
bellard
8900766099
2020-07-05 release
2020-09-06 19:07:30 +02:00
bellard
383e2b06c8
2020-03-16 release
2020-09-06 19:02:03 +02:00
bellard
91459fb672
2020-01-05 release
2020-09-06 18:53:08 +02:00