Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix passing adverbs to 'import' and 'no' statements
  • Loading branch information
niner committed Sep 19, 2015
1 parent 5256ed6 commit 0e0495e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Perl6/Actions.nqp
Expand Up @@ -5198,7 +5198,7 @@ Compilation unit '$file' contained the following violations:
if nqp::istype($_, QAST::Op) && istype($_.returns, $Pair) {
my $name := compile_time_value_str($_[1], 'LHS of pair', $/);
%named_counts{$name} := +%named_counts{$name} + 1;
unless $*IN_DECL eq 'use' {
unless $*IN_DECL eq 'use' || $*IN_DECL eq 'no' || $*IN_DECL eq 'import' {
$_[2].named($name);
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/Perl6/Grammar.nqp
Expand Up @@ -1457,6 +1457,7 @@ grammar Perl6::Grammar is HLL::Grammar does STD {
}

token statement_control:sym<import> {
:my $*IN_DECL := 'import';
<sym> <.ws>
<module_name> [ <.spacey> <arglist> ]? <.ws>
:my $*HAS_SELF := '';
Expand All @@ -1480,6 +1481,7 @@ grammar Perl6::Grammar is HLL::Grammar does STD {
}

token statement_control:sym<no> {
:my $*IN_DECL := 'no';
:my $longname;
<sym> <.ws>
[
Expand Down

0 comments on commit 0e0495e

Please sign in to comment.