File tree Expand file tree Collapse file tree 3 files changed +19
-0
lines changed Expand file tree Collapse file tree 3 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -327,6 +327,22 @@ class QRegex::P6Regex::Actions is HLL::Actions {
327
327
make $ qast ;
328
328
}
329
329
330
+ method assertion :sym <| >($/ ) {
331
+ my $ qast ;
332
+ my $ name := ~ $ < identifier > ;
333
+ if $ name eq ' c' {
334
+ # codepoint boundaries alway match in
335
+ # our current Unicode abstraction level
336
+ $ qast := 0 ;
337
+ }
338
+ elsif $ name eq ' w' {
339
+ $ qast := QAST ::Regex. new (: rxtype<subrule >, : subtype<method >,
340
+ : node($/ ), PAST::Node. new (' wb' ),
341
+ : name(' ' ) );
342
+ }
343
+ make $ qast ;
344
+ }
345
+
330
346
method assertion :sym <method >($/ ) {
331
347
my $ qast := $ < assertion > . ast;
332
348
$ qast . subtype(' method' );
Original file line number Diff line number Diff line change @@ -176,6 +176,7 @@ grammar QRegex::P6Regex::Grammar is HLL::Grammar {
176
176
177
177
token assertion :sym <? > { '?' [ <? before '>' > | <assertion > ] }
178
178
token assertion :sym <! > { '!' [ <? before '>' > | <assertion > ] }
179
+ token assertion :sym <| > { '|' <identifier > }
179
180
180
181
token assertion :sym <method > {
181
182
'.' <assertion >
Original file line number Diff line number Diff line change @@ -66,5 +66,7 @@ a<!wb> abc\ndef\n-==\nghi y \w\w nonword boundary
66
66
<+alpha-[Jj]>+ abc y character class with no j
67
67
<+ alpha - [ Jj ]> abc y character class with no j with ws
68
68
^<+alpha-[Jj]>+$ aJc n character class with no j fail
69
+ ^a<|w> a/ y <|w> matches
70
+ ^a<|w> ab n <|w> without match
69
71
70
72
## vim: noexpandtab tabstop=4 shiftwidth=4
You can’t perform that action at this time.
0 commit comments