-
Notifications
You must be signed in to change notification settings - Fork 23
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
Ideas for future redesign #6
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
v
(ES2024).options
argument used bycolorizeAll
andcolorizePattern
:flavor
- Ex:'JavaScript'
,'EMCAScript'
(alternative name:'JavaScript-WithoutWebReality'
),'PCRE'
,'XRegExp'
.'JavaScript'
.version
is not provided.version
- Regex flavor version. Ex: JavaScript/ECMAScript:'3'
,'5'
,'2024'
; PCRE:'8.45'
,'10.39'
.'latest'
.flavor
is not provided.'JavaScript'
+'2024'
, it sets of bunch of feature flags, and parsing code can check for the feature flags rather than flavor/version. New flavor versions can then just augment existing objects of feature flags.format
- Options:'...'
(default),'/.../flags'
, and maybe others.'/.../flags'
allows:/
in regex literals. Note: ES5 included a change to allow unescaped[/]
in regex literals.format
andflags
are provided.warningsOn
- On by default? Ex:||
at top level, range overflow, quantified lookaround, incomplete tokens\c
,\x
,\u
.compatibilityOn
- For differences in behavior for the same syntax across regex flavors (not for when some flavors don't support a feature). Ex: Empty char classes[]
,[^]
(JS), leading unescaped]
in char classes (non-JS).suggestionsOn
- Ex: Use of octals, escaped literals,[0-9]
→\d
(for flavors where\d
is ASCII only),[\S\s]
→ dot with/s
(if/s
is active or no existing dots).options
argument, withflavor
,version
,format
).The text was updated successfully, but these errors were encountered: