blib/lib/Marpa/HTML.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
condition | 34 | 68 | 50.0 |
line | !l | l&&!r | l&&r | condition |
---|---|---|---|---|
282 | 3257 | 0 | 0 | $trace_handlers and $user_handler |
358 | 3812 | 0 | 3121 | defined $first_token_id and defined $last_token_id |
393 | 0 | 913 | 2836 | $ref_type eq 'ARRAY' and $$next_tdesc[0] eq 'FINAL' |
555 | 96 | 317 | 0 | $pseudoclass and not $pseudoclass ~~ ['TOP', 'PI', 'DECL', 'COMMENT', 'PROLOG', 'TRAILER', 'WHITESPACE', 'CDATA', 'PCDATA', 'CRUFT'] |
564 | 96 | 317 | 0 | $pseudoclass and $element |
1094 | 0 | 0 | 60 | defined $element_type and $element_type ~~ ['block_element', 'header_element'] |
1286 | 675 | 0 | 0 | $trace_terminals > 1 and defined $virtual_terminal |
line | l | !l | condition |
---|---|---|---|
113 | 687 | 0 | $$user_handlers{'ANY'} // {} |
115 | 8 | 679 | $$user_handlers{$element} // {} |
421 | 109 | 0 | $per_node_data //= {} |
500 | 413 | 0 | ref $handler_description || 'not a reference' |
535 | 0 | 0 | ref $handler_specs || 'not a reference' |
592 | 90 | 0 | ref $arg || 'not a reference' |
600 | 0 | 0 | ref $option_hash || 'not a reference' |
875 | 0 | 91 | $$self{'trace_terminals'} // 0 |
991 | 29 | 21 | $Marpa::HTML::Internal::CONTENTS{$_} // 'flow' |
992 | 39 | 11 | $Marpa::HTML::Internal::ELEMENT_TYPE{$_} // 'inline_element' |
line | l | !l&&r | !l&&!r | condition |
---|---|---|---|---|
317 | 0 | 0 | 6933 | not $ref_type or $ref_type ne 'ARRAY' |
450 | 0 | 0 | 0 | $token_offset < 0 or $token_offset > $#{$html_parser_tokens;} |
474 | 0 | 0 | 0 | $token_offset < 0 or $token_offset > $#{$html_parser_tokens;} |
517 | 321 | 83 | 9 | !$element || $element eq '*' |
549 | 0 | 5 | 408 | ($element, $id) = $specifier =~ /\A ([^#]*) [#] (.*) \z/msx or ($element, $class) = $specifier =~ /\A ([^.]*) [.] (.*) \z/msx |
5 | 317 | 91 | ($element, $id) = $specifier =~ /\A ([^#]*) [#] (.*) \z/msx or ($element, $class) = $specifier =~ /\A ([^.]*) [.] (.*) \z/msx or ($element, $pseudoclass) = $specifier =~ /\A ([^:]*) [:] (.*) \z/msx | |
882 | 0 | 0 | 91 | not $ref_type or $ref_type ne 'SCALAR' |
0 | 0 | 91 | not $ref_type or $ref_type ne 'SCALAR' or not defined ${$document_ref;} | |
886 | 91 | 0 | 0 | 'HTML::PullParser'->new(%pull_parser_args, %Marpa::HTML::PULL_PARSER_OPTIONS) || Carp::croak('Could not create pull parser') |