Script.pm

filter: Statementstmt 75.0% 6 / 8 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 81.8% 9 / 11 CC 1 SCAR 0.9
CC
1
Cov
75%
BEGIN
1.3
BEGIN
1.0
BEGIN
1.0
CRAP 1.1
« Script/Parser.pm ↑ Summary Script/Lexer.pm »
1 package Text::Flowchart::Script;
2  
3 1 ▶use 5.006;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 our $VERSION = '0.02';
6  
7 0 ▶use Text::Flowchart::Script::Lexer;
Subroutine BEGIN: called CC=1 SCAR=2.6
8 use Text::Flowchart::Script::Parser;
9  
10 sub new {
11 bless {}, $_[0];
12 }
13  
14 sub parse {
15 $_[0]->{src} = $_[1];
16 Feed $_[0]->{src};
17 my $parser = Text::Flowchart::Script::Parser->new();
18 $_[0]->{parsed} = $parser->YYParse(yylex => \&Lexer);
19 }
20  
21 sub render {
22 my $output;
23 eval $_[0]->{parsed};
24 die "Rendering error $@\n" if $@;
25 $output;
26 }
27  
28 sub debug { $_[0]->{parsed}."\n" }
29  
30 1;
31 __END__
« Script/Parser.pm ↑ Summary Script/Lexer.pm »