| 1 | 4 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 2 | 4 | ▶ | use warnings FATAL => 'all'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | |||||||||||
| 4 | package MarpaX::Languages::ECMAScript::AST::Grammar::ECMAScript_262_5; | ||||||||||
| 5 | 4 | ▶ | use MarpaX::Languages::ECMAScript::AST::Impl; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 4 | ▶ | use MarpaX::Languages::ECMAScript::AST::Grammar::ECMAScript_262_5::Program; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 4 | ▶ | use MarpaX::Languages::ECMAScript::AST::Grammar::ECMAScript_262_5::StringNumericLiteral; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | 4 | ▶ | use MarpaX::Languages::ECMAScript::AST::Grammar::ECMAScript_262_5::Pattern; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | 4 | ▶ | use MarpaX::Languages::ECMAScript::AST::Grammar::ECMAScript_262_5::JSON; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | 4 | ▶ | use MarpaX::Languages::ECMAScript::AST::Grammar::ECMAScript_262_5::URI; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | 4 | ▶ | use MarpaX::Languages::ECMAScript::AST::Grammar::ECMAScript_262_5::Template; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 12 | 4 | ▶ | use MarpaX::Languages::ECMAScript::AST::Grammar::ECMAScript_262_5::SpacesAny; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 13 | |||||||||||
| 14 | # ABSTRACT: ECMAScript-262, Edition 5, grammar | ||||||||||
| 15 | |||||||||||
| 16 | 4 | our $VERSION = '0.020'; # VERSION | |||||||||
| 17 | |||||||||||
| 18 | |||||||||||
| 19 | 0 | ▶ | sub new { | ||||||||
|
Subroutine
new: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 20 | 0 | my ($class, %opts) = @_; | |||||||||
| 21 | |||||||||||
| 22 | 0 | my $self = {}; | |||||||||
| 23 | |||||||||||
| 24 | 0 | bless($self, $class); | |||||||||
| 25 | |||||||||||
| 26 | 0 | $self->_init(%opts); | |||||||||
| 27 | |||||||||||
| 28 | 0 | return $self; | |||||||||
| 29 | } | ||||||||||
| 30 | |||||||||||
| 31 | 0 | ▶ | sub _init { | ||||||||
|
Subroutine
_init: not called CC=3 SCAR=24.8
| |||||||||||
| 32 | 0 | my ($self, %opts) = @_; | |||||||||
| 33 | |||||||||||
| 34 | 0 | my $spacesAny = MarpaX::Languages::ECMAScript::AST::Grammar::ECMAScript_262_5::SpacesAny->new(); | |||||||||
| 35 | $self->{_spacesAny} = { | ||||||||||
| 36 | 0 | grammar => $spacesAny, | |||||||||
| 37 | impl => MarpaX::Languages::ECMAScript::AST::Impl->new($spacesAny->grammar_option(), $spacesAny->recce_option()) | ||||||||||
| 38 | }; | ||||||||||
| 39 | |||||||||||
| 40 | 0 | my $program = MarpaX::Languages::ECMAScript::AST::Grammar::ECMAScript_262_5::Program->new(); | |||||||||
| 41 | $self->{_program} = { | ||||||||||
| 42 | 0 | grammar => $program, | |||||||||
| 43 | impl => MarpaX::Languages::ECMAScript::AST::Impl->new($program->grammar_option(), $program->recce_option()) | ||||||||||
| 44 | }; | ||||||||||
| 45 | 0 | $program->spacesAny($self->spacesAny); | |||||||||
| 46 | |||||||||||
| 47 | 0 | my $JSON = MarpaX::Languages::ECMAScript::AST::Grammar::ECMAScript_262_5::JSON->new(); | |||||||||
| 48 | $self->{_JSON} = { | ||||||||||
| 49 | 0 | grammar => $JSON, | |||||||||
| 50 | impl => MarpaX::Languages::ECMAScript::AST::Impl->new($JSON->grammar_option(), $JSON->recce_option()) | ||||||||||
| 51 | }; | ||||||||||
| 52 | |||||||||||
| 53 | 0 | my $URI = MarpaX::Languages::ECMAScript::AST::Grammar::ECMAScript_262_5::URI->new(); | |||||||||
| 54 | $self->{_URI} = { | ||||||||||
| 55 | 0 | grammar => $URI, | |||||||||
| 56 | impl => MarpaX::Languages::ECMAScript::AST::Impl->new($URI->grammar_option(), $URI->recce_option()) | ||||||||||
| 57 | }; | ||||||||||
| 58 | |||||||||||
| 59 | 0 | ▶ | my $stringNumericLiteralOptionsp = exists($opts{StringNumericLiteral}) ? $opts{StringNumericLiteral} : undef; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 60 | 0 | my $stringNumericLiteral = MarpaX::Languages::ECMAScript::AST::Grammar::ECMAScript_262_5::StringNumericLiteral->new($stringNumericLiteralOptionsp); | |||||||||
| 61 | $self->{_stringNumericLiteral} = { | ||||||||||
| 62 | 0 | grammar => $stringNumericLiteral, | |||||||||
| 63 | impl => MarpaX::Languages::ECMAScript::AST::Impl->new($stringNumericLiteral->grammar_option(), $stringNumericLiteral->recce_option()) | ||||||||||
| 64 | }; | ||||||||||
| 65 | |||||||||||
| 66 | 0 | my $pattern = MarpaX::Languages::ECMAScript::AST::Grammar::ECMAScript_262_5::Pattern->new(); | |||||||||
| 67 | $self->{_pattern} = { | ||||||||||
| 68 | 0 | grammar => $pattern, | |||||||||
| 69 | impl => MarpaX::Languages::ECMAScript::AST::Impl->new($pattern->grammar_option(), $pattern->recce_option()) | ||||||||||
| 70 | }; | ||||||||||
| 71 | |||||||||||
| 72 | 0 | ▶ | my $templateOptionsp = exists($opts{Template}) ? $opts{Template} : undef; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 73 | 0 | $self->{_template} = MarpaX::Languages::ECMAScript::AST::Grammar::ECMAScript_262_5::Template->new($templateOptionsp); | |||||||||
| 74 | |||||||||||
| 75 | } | ||||||||||
| 76 | |||||||||||
| 77 | |||||||||||
| 78 | 0 | ▶ | sub program { | ||||||||
|
Subroutine
program: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 79 | 0 | my ($self) = @_; | |||||||||
| 80 | |||||||||||
| 81 | 0 | return $self->{_program}; | |||||||||
| 82 | } | ||||||||||
| 83 | |||||||||||
| 84 | |||||||||||
| 85 | 0 | ▶ | sub JSON { | ||||||||
|
Subroutine
JSON: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 86 | 0 | my ($self) = @_; | |||||||||
| 87 | |||||||||||
| 88 | 0 | return $self->{_JSON}; | |||||||||
| 89 | } | ||||||||||
| 90 | |||||||||||
| 91 | |||||||||||
| 92 | 0 | ▶ | sub URI { | ||||||||
|
Subroutine
URI: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 93 | 0 | my ($self) = @_; | |||||||||
| 94 | |||||||||||
| 95 | 0 | return $self->{_URI}; | |||||||||
| 96 | } | ||||||||||
| 97 | |||||||||||
| 98 | |||||||||||
| 99 | 0 | ▶ | sub template { | ||||||||
|
Subroutine
template: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 100 | 0 | my ($self) = @_; | |||||||||
| 101 | |||||||||||
| 102 | 0 | return $self->{_template}; | |||||||||
| 103 | } | ||||||||||
| 104 | |||||||||||
| 105 | |||||||||||
| 106 | 0 | ▶ | sub stringNumericLiteral { | ||||||||
|
Subroutine
stringNumericLiteral: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 107 | 0 | my ($self) = @_; | |||||||||
| 108 | |||||||||||
| 109 | 0 | return $self->{_stringNumericLiteral}; | |||||||||
| 110 | } | ||||||||||
| 111 | |||||||||||
| 112 | |||||||||||
| 113 | 0 | ▶ | sub pattern { | ||||||||
|
Subroutine
pattern: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 114 | 0 | my ($self) = @_; | |||||||||
| 115 | |||||||||||
| 116 | 0 | return $self->{_pattern}; | |||||||||
| 117 | } | ||||||||||
| 118 | |||||||||||
| 119 | |||||||||||
| 120 | 0 | ▶ | sub spacesAny { | ||||||||
|
Subroutine
spacesAny: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 121 | 0 | my ($self) = @_; | |||||||||
| 122 | |||||||||||
| 123 | 0 | return $self->{_spacesAny}; | |||||||||
| 124 | } | ||||||||||
| 125 | |||||||||||
| 126 | |||||||||||
| 127 | 4 | 1; | |||||||||
| 128 | |||||||||||
| 129 | __END__ | ||||||||||