Skip to content

Commit

Permalink
Suppress not used warnings if low-level code is used in the scope
Browse files Browse the repository at this point in the history
  • Loading branch information
sorear committed Jul 18, 2010
1 parent d38b860 commit b1f1f63
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Niecza/Actions.pm
Expand Up @@ -150,6 +150,11 @@ sub nibbler { my ($cl, $M) = @_;
if ($M->isa('STD::Regex')) {
$M->{_ast} = $M->{EXPR}{_ast};
} elsif ($M->isa('Niecza::Grammar::CgOp')) {
# XXX We don't interpret the code, so we can't tell if it's actually
# using variables, but still, it probably is.
for my $k (keys %$::CURLEX) {
$::CURLEX->{$k}{used} = 1 if $k =~ /^[\@\%\&\$]\w/;
}
$M->{_ast} = Op::CgOp->new(op => $M->{cgexp}{_ast});
} else {
# garden variety nibbler
Expand Down

0 comments on commit b1f1f63

Please sign in to comment.