Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reworks the rhemyn parser and extends it to additionally support the following:
^
{ type: 'Begin' }
$
{ type: 'End' }
\b
,\B
{ type: 'WordBoundary', negated: boolean }
(?=...)
,(?!...)
{ type: 'LookAhead', body: [ ... ], negated: boolean }
(?<=...)
,(?<!...)
{ type: 'LookBehind', body: [ ... ], negated: boolean }
(?<name>...)
{ type: 'Group', body: [ ... ], capture: 'name' }
(?:...)
{ type: 'Group', body: [ ... ] }
(...)
{ type: 'Group', body: [ ... ], capture: true }
...|...
{ type: 'Disjunction', options: [ ..., ... ] }
\1
,\2
etc.{ type: 'Backreference', number: number }
\k<...>
etc.{ type: 'NamedBackreference', name: string }
...{min,max}
{ ..., quantifier: [ min, max ] }
\p{...}
,\P{...}
{ type: 'CharacterClassEscape', classType: 'UnicodeProperty', property: string, value: string | null, negated: boolean }
\d
,\s
,\w
{ type: 'CharacterClassEscape', classType: 'Digit' | 'Whitespace' | 'WordCharacter', negated: boolean }
.
{ type: 'Dot' }
The last two changes have been done to move these options to the compiler and expose these class escapes to the user.
Additionally, there are now better error messages and unicode mode is supported. In fact, everything except for unicode sets mode should be supported now except for a few validation checks.
However: these features have not been implemented in the compiler! The compiler does not account for the new expressions and will throw errors, even for a few things that worked before! This is expected to change in the future.