Skip to content

Commit

Permalink
Re-instate null-regex semantics in 6.e
Browse files Browse the repository at this point in the history
If there *is* just whitespace between / and /
  • Loading branch information
lizmat committed Aug 22, 2022
1 parent eb5bf0d commit b50a0d0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Perl6/Grammar.nqp
Expand Up @@ -3511,8 +3511,11 @@ grammar Perl6::Grammar is HLL::Grammar does STD {
}
token quote:sym</null/> {
<?{ nqp::getcomp('Raku').language_revision lt 'e' }>
'/' \s* '/' <.typed_panic: "X::Syntax::Regex::NullRegex">
:my $rev := nqp::getcomp('Raku').language_revision;
<?{ $rev lt 'e' }>
'/' \s* '/' <.typed_panic: "X::Syntax::Regex::NullRegex">
| <?{ $rev ge 'e' }>
'/' \s+ '/' <.typed_panic: "X::Syntax::Regex::NullRegex">
}
token quote:sym</ /> {
:my %*RX;
Expand Down

0 comments on commit b50a0d0

Please sign in to comment.