| 1 | ############################################################################### | ||||||||||||||||||||||
| 2 | # The receiver class can reshape the data at any given rule match. | ||||||||||||||||||||||
| 3 | ############################################################################### | ||||||||||||||||||||||
| 4 | package JSONY::Receiver; | ||||||||||||||||||||||
| 5 | 6 | ▶ | use base 'Pegex::Tree'; | ||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||
| 6 | 6 | ▶ | use boolean; | ||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||
| 7 | |||||||||||||||||||||||
| 8 | 32 | ▶ | sub got_top_seq_entry { $_[1][0][0] } | ||||||||||||||||||||
|
Subroutine
got_top_seq_entry: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||
| 9 | 3 | ▶ | sub got_top_map { $_[0]->got_map([$_[1]]) } | ||||||||||||||||||||
|
Subroutine
got_top_map: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||
| 10 | 26 | ▶ | sub got_seq { $_[1]->[0] } | ||||||||||||||||||||
|
Subroutine
got_seq: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||
| 11 | 33 | ▶ | sub got_map { +{ map {($_->[0], $_->[1])} @{$_[1]->[0]} } } | ||||||||||||||||||||
|
Subroutine
got_map: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||
| 12 | 79 | ▶ | sub got_string {"$_[1]"} | ||||||||||||||||||||
|
Subroutine
got_string: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||
| 13 | sub got_bare { | ||||||||||||||||||||||
| 14 | 159 | ▶ | (undef, $_) = @_; | ||||||||||||||||||||
|
Subroutine
got_bare: called CC=5 SCAR=16.1
Pod
undocumented
| |||||||||||||||||||||||
| 15 | 159 | ▶ | /^true$/ ? true : | ||||||||||||||||||||
|
Branch: 4 branches
| |||||||||||||||||||||||
| 16 | /^false$/ ? false : | ||||||||||||||||||||||
| 17 | /^null$/ ? undef : | ||||||||||||||||||||||
| 18 | /^( | ||||||||||||||||||||||
| 19 | -? | ||||||||||||||||||||||
| 20 | (?: 0 | [1-9] [0-9]* ) | ||||||||||||||||||||||
| 21 | (?: \. [0-9]* )? | ||||||||||||||||||||||
| 22 | (?: [eE] [\-\+]? [0-9]+ )? | ||||||||||||||||||||||
| 23 | )$/x ? ($_ + 0) : | ||||||||||||||||||||||
| 24 | "$_" | ||||||||||||||||||||||
| 25 | } | ||||||||||||||||||||||
| 26 | sub got_list { | ||||||||||||||||||||||
| 27 | 39 | ▶ | (undef, $_) = @_; | ||||||||||||||||||||
|
Subroutine
got_list: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||
| 28 | 39 | ▶ | @$_ == 1 ? $_->[0] : $_; | ||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||
| 29 | } | ||||||||||||||||||||||
| 30 | |||||||||||||||||||||||
| 31 | 6 | 1; | |||||||||||||||||||||