Branch Coverage

src/keyword.c
Criterion Covered Total %
branch 163 244 66.8


line true false branch
57 3 0 sv_catpvf(message, "%s at %s line %" IVdf,
60 3 0 if(context)
62 3 0 sv_catpvf(message, ", near \"%" UTF8f "\"", UTF8fARG(UTF, contlen, context));
0 3 sv_catpvf(message, ", near \"%" UTF8f "\"", UTF8fARG(UTF, contlen, context));
0 0 sv_catpvf(message, ", near \"%" UTF8f "\"", UTF8fARG(UTF, contlen, context));
3 0 sv_catpvf(message, ", near \"%" UTF8f "\"", UTF8fARG(UTF, contlen, context));
3 0 sv_catpvf(message, ", near \"%" UTF8f "\"", UTF8fARG(UTF, contlen, context));
78 0 23 if(lex_peek_unichar(0) != c)
94 101 23 for(i = 0; s[i]; i++) {
95 81 20 if(s[i] != PL_parser->bufptr[i])
99 1 22 if(boundarycheck && isALNUM(PL_parser->bufptr[i]))
1 0 if(boundarycheck && isALNUM(PL_parser->bufptr[i]))
109 0 7 if(!len)
119 2 2 if(c == ';')
121 0 2 else if(!c || c == '}')
161 1 80 if(argi >= (SvLEN(argsv) / sizeof(XSParseKeywordPiece)))
162 1 0 SvGROW(argsv, SvLEN(argsv) * 2);
1 0 SvGROW(argsv, SvLEN(argsv) * 2);
166 0 81 THISARG.line =
180 4 5 if(lex_peek_unichar(0) != piece->u.c)
190 16 20 if(!len)
203 2 2 if(lex_peek_unichar(0) != '{')
211 3 2 if(!THISARG.sv)
218 1 1 if(!THISARG.sv)
225 1 1 if(!THISARG.sv)
233 0 0 if(!XSParseInfix_parse(aTHX_ piece->u.c, &THISARG.infix))
246 0 0 if(!probe_piece(aTHX_ argsv, argidx, pieces++, hookdata))
258 17 2 while(choices->type) {
259 12 5 if(probe_piece(aTHX_ argsv, argidx, choices + 0, hookdata)) {
273 9 1 while(choices->type) {
274 4 5 if(probe_piece(aTHX_ argsv, argidx, choices + 0, hookdata)) {
288 1 2 if(!probe_piece(aTHX_ argsv, argidx, pieces + 1, hookdata)) {
294 0 2 if(pieces[2].type)
297 1 1 if(!probe_piece(aTHX_ argsv, argidx, pieces + 0, hookdata))
304 0 1 if(!probe_piece(aTHX_ argsv, argidx, pieces + 0, hookdata))
311 0 2 if(piece->type & XPK_TYPEFLAG_MAYBEPARENS)
314 1 1 if(lex_peek_unichar(0) != '(')
321 1 1 if(lex_peek_unichar(0) != '[')
328 1 1 if(lex_peek_unichar(0) != '{')
335 1 1 if(lex_peek_unichar(0) != '<')
349 0 123 if(argi >= (SvLEN(argsv) / sizeof(XSParseKeywordPiece)))
350 0 0 SvGROW(argsv, SvLEN(argsv) * 2);
0 0 SvGROW(argsv, SvLEN(argsv) * 2);
354 0 123 THISARG.line =
396 0 8 if(is_enterleave)
401 2 6 if(piece->u.pieces) {
405 5 2 while(pieces->type) {
406 1 4 if(pieces->type == XS_PARSE_KEYWORD_SETUP)
416 1 1 if(*argidx > argi) {
419 0 1 if(argi >= (SvLEN(argsv) / sizeof(XSParseKeywordPiece)))
420 0 0 SvGROW(argsv, SvLEN(argsv) * 2);
0 0 SvGROW(argsv, SvLEN(argsv) * 2);
427 0 8 if(lex_peek_unichar(0) != '{')
431 0 8 CHECK_PARSEFAIL;
435 2 6 if(is_special)
438 2 6 if(want)
443 0 8 if(is_enterleave)
456 0 1 CHECK_PARSEFAIL;
471 2 17 if(lex_peek_unichar(0) == '(') {
476 0 2 CHECK_PARSEFAIL;
491 0 17 CHECK_PARSEFAIL;
494 1 18 if(want)
502 0 3 CHECK_PARSEFAIL;
504 0 3 if(want)
512 2 8 if(!THISARG.sv && !is_optional)
1 1 if(!THISARG.sv && !is_optional)
519 1 1 if(!THISARG.sv && !is_optional)
1 0 if(!THISARG.sv && !is_optional)
529 0 5 if(!varname)
533 0 3 if(!(piece->u.c & XPK_LEXVAR_SCALAR))
537 0 1 if(!(piece->u.c & XPK_LEXVAR_ARRAY))
541 0 1 if(!(piece->u.c & XPK_LEXVAR_HASH))
545 3 2 if(type == XS_PARSE_KEYWORD_LEXVARNAME) {
554 0 2 if(SvCUR(varname) == 2 && SvPVX(varname)[1] == '_')
0 0 if(SvCUR(varname) == 2 && SvPVX(varname)[1] == '_')
557 2 0 if(is_special)
571 3 1 if(lex_peek_unichar(0) == ':') {
578 7 3 while(lex_scan_attrval_into(attrname, attrval)) {
581 0 7 if(*argidx >= (SvLEN(argsv) / sizeof(XSParseKeywordPiece)))
582 0 0 SvGROW(argsv, SvLEN(argsv) * 2);
0 0 SvGROW(argsv, SvLEN(argsv) * 2);
592 2 5 if(lex_peek_unichar(0) == ':') {
609 1 3 if(!XSParseInfix_parse(aTHX_ piece->u.c, &THISARG.infix))
622 31 1 if(is_optional) {
625 17 14 if(!probe_piece(aTHX_ argsv, argidx, pieces, hookdata))
638 6 2 while(probe_piece(aTHX_ argsv, argidx, piece->u.pieces + 0, hookdata)) {
646 1 5 if(!probe_piece(aTHX_ argsv, argidx, piece, hookdata)) {
659 2 2 if(!probe_piece(aTHX_ argsv, argidx, piece->u.pieces + 0, hookdata))
668 0 4 if(is_optional) {
671 0 0 if(!has_paren) return;
675 3 1 if(has_paren) {
683 1 0 else if(piece->type & XPK_TYPEFLAG_MAYBEPARENS) {
695 0 2 if(is_optional) {
698 0 0 if(lex_peek_unichar(0) != '[') return;
712 0 2 if(is_optional) {
715 0 0 if(lex_peek_unichar(0) != '{') return;
729 0 2 if(is_optional) {
732 0 0 if(lex_peek_unichar(0) != '<') return;
752 73 94 for(idx = 0; pieces[idx].type; idx++) {
762 2 95 if(hooks->parse)
773 55 40 if(hooks->build)
778 2 90 if(hooks->flags & XPK_FLAG_AUTOSEMI) {
787 55 37 if(hooks->build) {
795 83 55 for(i = 0; i < argidx; i++)
800 0 37 else if(reg->apiver < 2) {
813 0 0 if(ret && (ret != KEYWORD_PLUGIN_EXPR))
818 0 2 if(ret && (ret != KEYWORD_PLUGIN_STMT))
830 61 232 if(!hooks->build1 && !hooks->build && !hooks->parse)
2 59 if(!hooks->build1 && !hooks->build && !hooks->parse)
0 2 if(!hooks->build1 && !hooks->build && !hooks->parse)
843 293 0 if(hooks->permit_hintkey)
866 22750 0 if(PL_parser && PL_parser->error_count)
0 22750 if(PL_parser && PL_parser->error_count)
872 305194 22653 for(reg = registrations; reg; reg = reg->next) {
873 2343 302851 if(reg->kwlen != kwlen || !strEQ(reg->kwname, kw))
2244 99 if(reg->kwlen != kwlen || !strEQ(reg->kwname, kw))
876 99 0 if(reg->hooks->permit_hintkey &&
99 0 if(reg->hooks->permit_hintkey &&
877 1 98 (!hints || !hv_fetch(hints, reg->hooks->permit_hintkey, reg->permit_hintkey_len, 0)))
884 2 95 if(reg->hooks->check)
895 94 0 if(ret && !*op)
0 94 if(ret && !*op)