Skip to content

Commit

Permalink
skip false positives - draft function
Browse files Browse the repository at this point in the history
  • Loading branch information
htrgouvea committed Mar 29, 2024
1 parent 5dfc632 commit 22367a2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/Zarn/AST.pm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package Zarn::AST {
use PPI::Find;
use PPI::Document;

our $VERSION = '0.0.2';
our $VERSION = '0.0.3';

sub new {
my ($self, $parameters) = @_;
Expand Down Expand Up @@ -41,6 +41,12 @@ package Zarn::AST {
);

if ($var_token && $var_token -> can("parent")) {
my @childrens = $var_token -> parent -> children;

if (grep {$_ -> isa("PPI::Token::Quote::Double")} @childrens) {
next;
}

if ((
$var_token -> parent -> isa("PPI::Token::Operator") ||
$var_token -> parent -> isa("PPI::Statement::Expression")
Expand Down

0 comments on commit 22367a2

Please sign in to comment.