line |
true |
false |
branch |
97
|
51 |
49 |
FOREACH_HOOKS_FORWARD { |
|
51 |
49 |
FOREACH_HOOKS_FORWARD { |
100
|
50 |
1 |
if(!(hooks->flags & XS_PARSE_SUBLIKE_FLAG_BODY_OPTIONAL)) |
102
|
3 |
48 |
if(hooks->flags & XS_PARSE_SUBLIKE_COMPAT_FLAG_DYNAMIC_ACTIONS) |
106
|
48 |
1 |
if(!(skip_parts & XS_PARSE_SUBLIKE_PART_NAME)) { |
110
|
4 |
45 |
if((require_parts & XS_PARSE_SUBLIKE_PART_NAME) && !ctx.name) |
|
1 |
3 |
if((require_parts & XS_PARSE_SUBLIKE_PART_NAME) && !ctx.name) |
114
|
9 |
39 |
ctx.actions = ctx.name |
118
|
50 |
48 |
FOREACH_HOOKS_FORWARD { |
|
50 |
48 |
FOREACH_HOOKS_FORWARD { |
119
|
13 |
37 |
if(hooks->pre_subparse) |
129
|
45 |
3 |
if(!have_dynamic_actions) { |
130
|
36 |
9 |
if(ctx.name) |
137
|
9 |
39 |
if(ctx.actions & XS_PARSE_SUBLIKE_ACTION_CVf_ANON) |
147
|
47 |
1 |
if(!(skip_parts & XS_PARSE_SUBLIKE_PART_ATTRS) && (lex_peek_unichar(0) == ':')) { |
|
4 |
43 |
if(!(skip_parts & XS_PARSE_SUBLIKE_PART_ATTRS) && (lex_peek_unichar(0) == ':')) { |
156
|
4 |
4 |
if(!lex_scan_attrval_into(attr, val)) |
159
|
0 |
4 |
if(lex_peek_unichar(0) == ':') { |
166
|
4 |
4 |
FOREACH_HOOKS_FORWARD { |
|
4 |
4 |
FOREACH_HOOKS_FORWARD { |
167
|
1 |
3 |
if((hooks->flags & XS_PARSE_SUBLIKE_FLAG_FILTERATTRS) && (hooks->filter_attr)) |
|
1 |
0 |
if((hooks->flags & XS_PARSE_SUBLIKE_FLAG_FILTERATTRS) && (hooks->filter_attr)) |
171
|
1 |
3 |
if(handled) { |
177
|
0 |
3 |
if(strEQ(SvPVX(attr), "lvalue")) { |
182
|
1 |
2 |
if(SvPOK(val)) |
193
|
50 |
48 |
FOREACH_HOOKS_FORWARD { |
|
50 |
48 |
FOREACH_HOOKS_FORWARD { |
194
|
10 |
40 |
if(hooks->post_blockstart) |
206
|
47 |
1 |
if(!(skip_parts & XS_PARSE_SUBLIKE_PART_SIGNATURE) && (lex_peek_unichar(0) == '(')) { |
|
21 |
26 |
if(!(skip_parts & XS_PARSE_SUBLIKE_PART_SIGNATURE) && (lex_peek_unichar(0) == '(')) { |
210
|
21 |
0 |
if(require_parts & XS_PARSE_SUBLIKE_PART_SIGNATURE) { |
254
|
21 |
21 |
FOREACH_HOOKS_FORWARD { |
|
21 |
21 |
FOREACH_HOOKS_FORWARD { |
255
|
9 |
12 |
if(hooks->flags & XS_PARSE_SUBLIKE_FLAG_SIGNATURE_NAMED_PARAMS) |
257
|
4 |
17 |
if(hooks->flags & XS_PARSE_SUBLIKE_FLAG_SIGNATURE_PARAM_ATTRIBUTES) |
261
|
10 |
11 |
if(flags) |
266
|
0 |
21 |
if(PL_parser->error_count) { |
273
|
0 |
21 |
if(lex_peek_unichar(0) != ')') |
280
|
44 |
4 |
if(lex_peek_unichar(0) == '{') { |
285
|
3 |
1 |
else if(require_parts & XS_PARSE_SUBLIKE_PART_BODY) |
287
|
0 |
1 |
else if(lex_peek_unichar(0) == ';') { |
294
|
44 |
1 |
if(ctx.body && sigop) { |
|
21 |
23 |
if(ctx.body && sigop) { |
298
|
6 |
15 |
if (ctx.body->op_type == OP_STUB) { |
306
|
0 |
45 |
if(PL_parser->error_count) { |
320
|
0 |
0 |
while(PL_scopestack_ix > was_scopestack_ix) |
324
|
0 |
0 |
if(ctx.name) { |
337
|
47 |
45 |
FOREACH_HOOKS_REVERSE { |
|
47 |
45 |
FOREACH_HOOKS_REVERSE { |
338
|
12 |
35 |
if(hooks->pre_blockend) |
348
|
44 |
1 |
if(ctx.body) { |
351
|
41 |
3 |
if(!have_dynamic_actions) { |
352
|
33 |
8 |
if(ctx.name) |
364
|
36 |
8 |
if(ctx.name && action_set_cvname && action_install_symbol) |
|
35 |
1 |
if(ctx.name && action_set_cvname && action_install_symbol) |
367
|
0 |
44 |
if(!nameop && action_install_symbol) |
372
|
1 |
43 |
if(!nameop && action_set_cvname) { |
375
|
1 |
0 |
const char *name = SvPV_const(ctx.name, namelen); |
386
|
1 |
0 |
CvNAME_HEK_set(ctx.cv, |
395
|
47 |
45 |
FOREACH_HOOKS_FORWARD { |
|
47 |
45 |
FOREACH_HOOKS_FORWARD { |
396
|
11 |
36 |
if(hooks->post_newcv) |
403
|
42 |
3 |
if(!have_dynamic_actions) { |
404
|
8 |
34 |
if(!ctx.name) |
410
|
35 |
10 |
if(!(ctx.actions & XS_PARSE_SUBLIKE_ACTION_REFGEN_ANONCODE)) { |
420
|
42 |
3 |
if(!have_dynamic_actions) { |
421
|
8 |
34 |
if(!ctx.name) |
427
|
35 |
10 |
return (ctx.actions & XS_PARSE_SUBLIKE_ACTION_RET_EXPR) ? KEYWORD_PLUGIN_EXPR : KEYWORD_PLUGIN_STMT; |
471
|
26 |
9 |
if(reg->hooks->permit_hintkey) |
476
|
26 |
9 |
if(!reg->hooks->permit && !reg->hooks->permit_hintkey) |
|
0 |
26 |
if(!reg->hooks->permit && !reg->hooks->permit_hintkey) |
503
|
45197 |
26755 |
for(reg = registrations; reg; reg = reg->next) { |
504
|
3767 |
41430 |
if(reg->kwlen != kwlen || !strEQ(reg->kw, kw)) |
|
3715 |
52 |
if(reg->kwlen != kwlen || !strEQ(reg->kw, kw)) |
507
|
35 |
17 |
if(reg->hooks->permit_hintkey && |
|
35 |
0 |
if(reg->hooks->permit_hintkey && |
508
|
1 |
34 |
(!hints || !hv_fetch(hints, reg->hooks->permit_hintkey, reg->permit_hintkey_len, 0))) |
524
|
1 |
0 |
if(!kwsv || !SvCUR(kwsv)) |
|
0 |
1 |
if(!kwsv || !SvCUR(kwsv)) |
527
|
1 |
0 |
const char *kw = SvPV_nolen(kwsv); |
534
|
0 |
1 |
if(kwlen != 3 || !strEQ(kw, "sub")) { |
|
0 |
0 |
if(kwlen != 3 || !strEQ(kw, "sub")) { |
|
0 |
0 |
if(kwlen != 3 || !strEQ(kw, "sub")) { |
|
0 |
0 |
if(kwlen != 3 || !strEQ(kw, "sub")) { |
|
0 |
0 |
if(kwlen != 3 || !strEQ(kw, "sub")) { |
536
|
0 |
1 |
if(!reg) |
537
|
0 |
0 |
croak("Expected a keyword to introduce a sub or sub-like construction, found " QUOTED_PVNf, |
|
0 |
0 |
croak("Expected a keyword to introduce a sub or sub-like construction, found " QUOTED_PVNf, |
549
|
1 |
0 |
if(reg) { |
554
|
0 |
1 |
return parse(aTHX_ hd, 1 + !!reg, op_ptr); |
564
|
0 |
6 |
if(funcs->ver < 5) |
567
|
0 |
6 |
if(funcs->ver > XSPARSESUBLIKE_ABI_VERSION) |
571
|
6 |
0 |
if(!name || !(name[0] >= 'A' && name[0] <= 'Z')) |
|
0 |
6 |
if(!name || !(name[0] >= 'A' && name[0] <= 'Z')) |
574
|
0 |
6 |
if(!funcs->permit_hintkey) |
604
|
26755 |
48 |
if(!reg) |
621
|
6 |
43 |
while(hooks->flags & XS_PARSE_SUBLIKE_FLAG_PREFIX) { |
626
|
6 |
0 |
if(!kwsv || !SvCUR(kwsv)) |
|
0 |
6 |
if(!kwsv || !SvCUR(kwsv)) |
629
|
6 |
0 |
kw = SvPV_nolen(kwsv); |
635
|
5 |
1 |
if(kwlen == 3 && strEQ(kw, "sub")) |
|
5 |
0 |
if(kwlen == 3 && strEQ(kw, "sub")) |
|
5 |
0 |
if(kwlen == 3 && strEQ(kw, "sub")) |
|
5 |
0 |
if(kwlen == 3 && strEQ(kw, "sub")) |
|
0 |
5 |
if(kwlen == 3 && strEQ(kw, "sub")) |
639
|
0 |
1 |
if(!reg) |
640
|
0 |
0 |
croak("Expected a keyword to introduce a sub or sub-like construction, found " QUOTED_PVNf, |
|
0 |
0 |
croak("Expected a keyword to introduce a sub or sub-like construction, found " QUOTED_PVNf, |
645
|
0 |
1 |
if(SvLEN(hdlsv) < (nhooks + 1) * sizeof(struct HooksAndData)) { |
646
|
0 |
0 |
SvGROW(hdlsv, SvLEN(hdlsv) * 2); |
|
0 |
0 |
SvGROW(hdlsv, SvLEN(hdlsv) * 2); |