Skip to content

Commit

Permalink
Make prefix // working again
Browse files Browse the repository at this point in the history
Somehow this was missed by an internal reorganization on language
versions.  Lack of tests is probably the reason :-(

Also make sure prefix // has the same precedence as prefix +
  • Loading branch information
lizmat committed Mar 4, 2023
1 parent 61b8bee commit efb59f7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/Perl6/Grammar.nqp
Expand Up @@ -3511,9 +3511,9 @@ grammar Perl6::Grammar is HLL::Grammar does STD {
token quote:sym</null/> {
:my $rev := nqp::getcomp('Raku').language_revision;
<?{ $rev lt 'e' }>
<?{ $rev < 3 }>
'/' \s* '/' <.typed_panic: "X::Syntax::Regex::NullRegex">
| <?{ $rev ge 'e' }>
| <?{ $rev >= 3 }>
'/' \s+ '/' <.typed_panic: "X::Syntax::Regex::NullRegex">
}
token quote:sym</ /> {
Expand Down Expand Up @@ -4102,7 +4102,7 @@ grammar Perl6::Grammar is HLL::Grammar does STD {
}
token prefix:sym<> { <sym> <O(|%symbolic_unary)> }
token prefix:sym<//> {
<?{ nqp::getcomp('Raku').language_revision ge 'e' }>
<?{ nqp::getcomp('Raku').language_revision >= 3 }>
<sym> <O(|%symbolic_unary)>
}
Expand Down
2 changes: 1 addition & 1 deletion src/core.e/control.pm6
@@ -1,7 +1,7 @@
multi sub next(\x --> Nil) { THROW(nqp::const::CONTROL_NEXT, x) }
multi sub last(\x --> Nil) { THROW(nqp::const::CONTROL_LAST, x) }

proto sub prefix:<//>($) is pure {*}
proto sub prefix:<//>($) is pure is equiv(&prefix:<+>) {*}
multi sub prefix:<//>(\a) { a.defined }

# vim: expandtab shiftwidth=4

0 comments on commit efb59f7

Please sign in to comment.