Branch Coverage

blib/lib/WWW/Shopify/Liquid/Parser.pm
Criterion Covered Total %
branch 0 122 0.0


line true false branch
27 0 0 if defined $_[1]
37 0 0 if $_[1]->is_free
38 0 0 if ($_[1]->is_enclosing)
52 0 0 if ($element) { }
72 0 0 if ($filter_name =~ /::/) { }
75 0 0 if ($@)
76 0 0 unless $self->accept_unknown_filters
80 0 0 if (not $self->{'filters'}{$filter_name}) { }
81 0 0 unless $self->accept_unknown_filters
87 0 0 if int @tokens > 0 and $tokens[0]{'core'} ne ':'
91 0 0 if (shift @tokens)
93 0 0 if $_->isa('WWW::Shopify::Liquid::Token::Separator') and $_->{'core'} eq ','
111 0 0 if $_->isa('WWW::Shopify::Liquid::Token::Variable::Named')
121 0 0 if $_->isa('WWW::Shopify::Liquid::Token::Operator') and defined $_->{'core'} and $self->operator($_->{'core'})
124 0 0 $fixness eq 'postfix' ? :
125 0 0 $fixness eq 'potsfix' ? :
135 0 0 if $_->isa('WWW::Shopify::Liquid::Token::Operator')
0 0 if (int grep({$_->{'core'} eq '|' if $_->isa('WWW::Shopify::Liquid::Token::Operator');} @argument_tokens) == 0) { }
138 0 0 if $_->isa('WWW::Shopify::Liquid::Token::Separator')
156 0 0 if ($operators->[0] eq 'WWW::Shopify::Liquid::Operator::Pipe') { }
157 0 0 if $_->isa('WWW::Shopify::Liquid::Token::Operator')
0 0 if ((my $idx = &firstidx(sub { $_->{'core'} eq '|' if $_->isa('WWW::Shopify::Liquid::Token::Operator'); } , @tokens)) != -1)
158 0 0 if $idx == 0
161 0 0 if $_->[0]{'core'} eq '|'
0 0 if $_->isa('WWW::Shopify::Liquid::Token::Operator') and $_->{'core'} eq '|'
170 0 0 if $_->isa('WWW::Shopify::Liquid::Token::Operator')
173 0 0 unless $idx > 0 and $idx < $#tokens and $op1->isa('WWW::Shopify::Liquid::Operator') || $op1->isa('WWW::Shopify::Liquid::Token::Operand') || $op1->isa('WWW::Shopify::Liquid::Filter') and $op2->isa('WWW::Shopify::Liquid::Operator') || $op2->isa('WWW::Shopify::Liquid::Token::Operand') || $op2->isa('WWW::Shopify::Liquid::Filter')
177 0 0 if $op1->isa('WWW::Shopify::Liquid::Token::Grouping')
178 0 0 if $op2->isa('WWW::Shopify::Liquid::Token::Grouping')
185 0 0 unless int grep({not $_->isa('WWW::Shopify::Liquid::Token::Variable::Named');} @tokens) == 1 or int grep({not $_->isa('WWW::Shopify::Liquid::Token::Variable::Named');} @tokens) == 0
195 0 0 if int @tokens == 0
201 0 0 if ($token->isa('WWW::Shopify::Liquid::Token::Tag')) { }
0 0 elsif ($token->isa('WWW::Shopify::Liquid::Token::Output')) { }
203 0 0 if ($self->enclosing_tags->{$token->tag}) { }
0 0 elsif ($self->free_tags->{$token->tag}) { }
210 0 0 if ($tokens[$_]->isa('WWW::Shopify::Liquid::Token::Tag'))
211 0 0 if ($self->enclosing_tags->{$tokens[$_]->tag}) { }
0 0 elsif (exists $allowed_internal_tags{$tokens[$_]->tag} and $level == 1) { }
0 0 elsif ($tokens[$_]->tag eq 'end' . $token->tag and $level == 1) { }
0 0 elsif ($tokens[$_]->tag =~ /^end/) { }
221 0 0 if $self->enclosing_tags->{$token->tag}->inner_ignore_whitespace and int @contents > 0 and int @{$contents[0];} > 0 and $contents[0][0]->isa('WWW::Shopify::Liquid::Token::Text::Whitespace')
224 0 0 if (int @array > 0 and $array[0]->isa('WWW::Shopify::Liquid::Token::Tag') and $allowed_internal_tags{$array[0]->tag}) { }
243 0 0 unless $closed
252 0 0 if $token->tag =~ /^end(\w+)$/ and $self->enclosing_tags->{$1}
253 0 0 if exists $self->inner_tags->{$token->tag}
267 0 0 if (int @tags > 1) { }
278 0 0 if $self->is_processed($ast)
279 0 0 if ($ast->isa('WWW::Shopify::Liquid::Filter')) { }
0 0 elsif ($ast->isa('WWW::Shopify::Liquid::Operator')) { }
283 0 0 int @{$ast->{'arguments'};} > 0 ? :
287 0 0 $_ > 0 ? :
294 0 0 if $ast->requires_grouping
303 0 0 if $self->is_processed($ast) or $ast->isa('WWW::Shopify::Liquid::Token')
304 0 0 if ($ast->isa('WWW::Shopify::Liquid::Tag'))
305 0 0 $ast->{'arguments'} ? :
306 0 0 if ($ast->isa('WWW::Shopify::Liquid::Tag::Enclosing')) { }
0 0 elsif ($ast->isa('WWW::Shopify::Liquid::Tag::Output')) { }
307 0 0 if ($ast->isa('WWW::Shopify::Liquid::Tag::If')) { }
308 0 0 unless $ast->{'false_path'}
323 0 0 if ($ast->isa('WWW::Shopify::Liquid::Filter'))
326 0 0 if $ast->isa('WWW::Shopify::Liquid::Operator::Concatenate')