File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -85,7 +85,10 @@ class QRegex::P5Regex::Actions is HLL::Actions {
85
85
}
86
86
87
87
method p5metachar :sym < ( )> ($/ ) {
88
- make QAST ::Regex. new ( $ < nibbler > . ast, : rxtype<subcapture >, : node($/ ) );
88
+ make QAST ::Regex. new ( : rxtype<subcapture >, : node($/ ),
89
+ $ < nibbler >
90
+ ?? $ < nibbler > [0 ]. ast
91
+ !! QAST ::Regex. new ( : rxtype<anchor >, : subtype<pass > ) );
89
92
}
90
93
91
94
method p5metachar :sym < [ ]> ($/ ) {
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ grammar QRegex::P5Regex::Grammar is HLL::Grammar {
59
59
'(?' { } <assertion = p5assertion >
60
60
[ ')' || <.panic : "Perl 5 regex assertion not terminated by parenthesis" > ]
61
61
}
62
- token p5metachar :sym <( ) > { '(' { } <nibbler > ')' }
62
+ token p5metachar :sym <( ) > { '(' { } <nibbler >? ')' }
63
63
token p5metachar :sym <[ ] > { <? before '[' > <cclass > }
64
64
65
65
token cclass {
You can’t perform that action at this time.
0 commit comments