Branch Coverage

src/keyword.c
Criterion Covered Total %
branch 171 260 65.7


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) != '<')
347 6 3 while(pieces->type) {
348 2 4 if(pieces->type == XS_PARSE_KEYWORD_SETUP)
373 0 124 CHECK_GROW_ARGSV;
0 0 CHECK_GROW_ARGSV;
0 0 CHECK_GROW_ARGSV;
375 0 124 THISARG.line =
417 0 8 if(is_enterleave)
422 2 6 if(piece->u.pieces) {
425 1 1 if(*argidx > argi) {
427 0 1 CHECK_GROW_ARGSV;
0 0 CHECK_GROW_ARGSV;
0 0 CHECK_GROW_ARGSV;
432 0 8 if(lex_peek_unichar(0) != '{')
436 0 8 CHECK_PARSEFAIL;
440 2 6 if(is_special)
443 2 6 if(want)
448 0 8 if(is_enterleave)
461 0 1 CHECK_PARSEFAIL;
474 1 19 if(is_enterleave)
477 1 19 if(piece->u.pieces) {
480 0 1 if(*argidx > argi) {
482 0 0 CHECK_GROW_ARGSV;
0 0 CHECK_GROW_ARGSV;
0 0 CHECK_GROW_ARGSV;
489 2 18 if(lex_peek_unichar(0) == '(') {
494 0 2 CHECK_PARSEFAIL;
509 0 18 CHECK_PARSEFAIL;
512 1 19 if(want)
517 1 19 if(is_enterleave)
525 0 3 CHECK_PARSEFAIL;
527 0 3 if(want)
535 2 8 if(!THISARG.sv && !is_optional)
1 1 if(!THISARG.sv && !is_optional)
542 1 1 if(!THISARG.sv && !is_optional)
1 0 if(!THISARG.sv && !is_optional)
552 0 5 if(!varname)
556 0 3 if(!(piece->u.c & XPK_LEXVAR_SCALAR))
560 0 1 if(!(piece->u.c & XPK_LEXVAR_ARRAY))
564 0 1 if(!(piece->u.c & XPK_LEXVAR_HASH))
568 3 2 if(type == XS_PARSE_KEYWORD_LEXVARNAME) {
577 0 2 if(SvCUR(varname) == 2 && SvPVX(varname)[1] == '_')
0 0 if(SvCUR(varname) == 2 && SvPVX(varname)[1] == '_')
580 2 0 if(is_special)
594 3 1 if(lex_peek_unichar(0) == ':') {
601 7 3 while(lex_scan_attrval_into(attrname, attrval)) {
604 0 7 if(*argidx >= (SvLEN(argsv) / sizeof(XSParseKeywordPiece)))
605 0 0 SvGROW(argsv, SvLEN(argsv) * 2);
0 0 SvGROW(argsv, SvLEN(argsv) * 2);
615 2 5 if(lex_peek_unichar(0) == ':') {
632 1 3 if(!XSParseInfix_parse(aTHX_ piece->u.c, &THISARG.infix))
645 31 1 if(is_optional) {
648 17 14 if(!probe_piece(aTHX_ argsv, argidx, pieces, hookdata))
661 6 2 while(probe_piece(aTHX_ argsv, argidx, piece->u.pieces + 0, hookdata)) {
669 1 5 if(!probe_piece(aTHX_ argsv, argidx, piece, hookdata)) {
682 2 2 if(!probe_piece(aTHX_ argsv, argidx, piece->u.pieces + 0, hookdata))
691 0 4 if(is_optional) {
694 0 0 if(!has_paren) return;
698 3 1 if(has_paren) {
706 1 0 else if(piece->type & XPK_TYPEFLAG_MAYBEPARENS) {
718 0 2 if(is_optional) {
721 0 0 if(lex_peek_unichar(0) != '[') return;
735 0 2 if(is_optional) {
738 0 0 if(lex_peek_unichar(0) != '{') return;
752 0 2 if(is_optional) {
755 0 0 if(lex_peek_unichar(0) != '<') return;
775 73 94 for(idx = 0; pieces[idx].type; idx++) {
785 2 96 if(hooks->parse)
796 55 41 if(hooks->build)
801 2 91 if(hooks->flags & XPK_FLAG_AUTOSEMI) {
810 55 38 if(hooks->build) {
814 55 0 if(argidx) {
822 83 55 for(i = 0; i < argidx; i++)
827 0 38 else if(reg->apiver < 2) {
840 0 0 if(ret && (ret != KEYWORD_PLUGIN_EXPR))
846 0 2 if(ret && (ret != KEYWORD_PLUGIN_STMT))
859 61 243 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)
872 304 0 if(hooks->permit_hintkey)
895 22753 0 if(PL_parser && PL_parser->error_count)
0 22753 if(PL_parser && PL_parser->error_count)
901 316685 22655 for(reg = registrations; reg; reg = reg->next) {
902 2344 314341 if(reg->kwlen != kwlen || !strEQ(reg->kwname, kw))
2244 100 if(reg->kwlen != kwlen || !strEQ(reg->kwname, kw))
905 100 0 if(reg->hooks->permit_hintkey &&
100 0 if(reg->hooks->permit_hintkey &&
906 1 99 (!hints || !hv_fetch(hints, reg->hooks->permit_hintkey, reg->permit_hintkey_len, 0)))
913 2 96 if(reg->hooks->check)
924 95 0 if(ret && !*op)
0 95 if(ret && !*op)