Skip to content

Commit 32fb34c

Browse files
committed
nqpq: protoregex stub.
1 parent 6262ccf commit 32fb34c

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/NQPQ/Grammar.pm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,9 +499,10 @@ grammar NQP::Grammar is HLL::Grammar {
499499
| $<proto>=[proto] [regex|token|rule]
500500
<deflongname>
501501
[
502+
|| '{*}'<?ENDSTMT>
502503
|| '{' '<...>' '}'<?ENDSTMT>
503504
|| '{' '<*>' '}'<?ENDSTMT>
504-
|| <.panic: "Proto regex body must be <*> (or <...>, which is deprecated)">
505+
|| <.panic: "Proto regex body must be \{*\} (or <*> or <...>, which are deprecated)">
505506
]
506507
| $<sym>=[regex|token|rule]
507508
<deflongname>

src/QRegex/Cursor.nqp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ role NQPCursorRole {
8787
$!pos := -3;
8888
}
8989

90+
method !protoregex($name) {
91+
pir::say($name);
92+
}
93+
9094
method !BACKREF($name) {
9195
my $cur := self."!cursor_start"();
9296
my $n := $!cstack ?? nqp::elems($!cstack) - 1 !! -1;

0 commit comments

Comments
 (0)