File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -118,8 +118,8 @@ grammar NQP::Grammar is HLL::Grammar {
118
118
}
119
119
120
120
rule statementlist {
121
- | $
122
- | [<statement ><.eat_terminator > ]*
121
+ | <?> $
122
+ | <?> [<statement ><.eat_terminator > ]*
123
123
}
124
124
125
125
token statement {
@@ -388,10 +388,13 @@ grammar NQP::Grammar is HLL::Grammar {
388
388
token scope_declarator :sym <our > { <sym > <scoped (' our' )> }
389
389
token scope_declarator :sym <has > { <sym > <scoped (' has' )> }
390
390
391
- rule scoped ($ * SCOPE ) {
391
+ token scoped ($ * SCOPE ) {
392
+ <.ws >
393
+ [
392
394
| <declarator >
393
395
| <multi_declarator >
394
396
| <package_declarator >
397
+ ]
395
398
}
396
399
397
400
token typename {
@@ -491,7 +494,7 @@ grammar NQP::Grammar is HLL::Grammar {
491
494
':' <param_var >
492
495
}
493
496
494
- rule default_value { '=' <EXPR (' i=' )> }
497
+ rule default_value { <?> '=' <EXPR (' i=' )> }
495
498
496
499
rule trait { <trait_mod > }
497
500
@@ -613,7 +616,7 @@ grammar NQP::Grammar is HLL::Grammar {
613
616
token circumfix :sym <{ } > { <?[ { ] > <pblock > }
614
617
token circumfix :sym <sigil > { <sigil > '(' ~ ')' <semilist > }
615
618
616
- rule semilist { <statement > }
619
+ rule semilist { <?> < statement > }
617
620
618
621
# # Operators
619
622
Original file line number Diff line number Diff line change @@ -63,11 +63,14 @@ grammar QRegex::P6Regex::Grammar is HLL::Grammar {
63
63
}
64
64
65
65
token termish {
66
+ <.ws >
67
+ [
66
68
|| <noun = .quantified_atom >+
67
69
|| (\W ) {
68
70
my $ char := ~ $/ [0 ];
69
71
$/ . CURSOR. panic(" Unrecognized regex metacharacter $ char (must be quoted to match literally)" )
70
72
}
73
+ ]
71
74
}
72
75
73
76
token quantified_atom {
You can’t perform that action at this time.
0 commit comments