C/LiteralVisitor.pm

filter: Statementstmt 3.0% 8 / 266 Branchbran 0.0% 0 / 84 Conditioncond 0.0% 0 / 24 MC/DCmcdc 0.0% 0 / 14 Subroutinesub 3.7% 2 / 53 Podpod 0.0% 0 / 49 totaltotal 2.0% 10 / 490 CC 70 SCAR 41.5
CC
70
Cov
2%
visitIntegerLiteral
342.0
_Eval
72.0
visitWideStringLiteral
42.0
CRAP 63.7
« C/IncludeVisitor.pm ↑ Summary C/LengthVisitor.pm »
1
2 #
3 # Interface Definition Language (OMG IDL CORBA v3.0)
4 #
5 # C Language Mapping Specification, New Edition June 1999
6 #
7
8 package CORBA::C::LiteralVisitor;
9
10 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
12
13 1 our $VERSION = '2.60';
14
15 # needs $node->{c_name} (CnameVisitor) for Enum
16 # builds $node->{c_literal}
17
18 0 ▶sub new {
Subroutine new: not called CC=2 SCAR=17.9
Pod undocumented
19 0 my $proto = shift;
20 0 ▶ my $class = ref($proto) || $proto;
Condition0%0/3
ref $proto || $proto
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $proto || $proto
ref $proto $proto
Truth table0%0/3
A || B
A= ref $protoB= $proto
ABresult
1X1
011
000
21 0 my $self = {};
22 0 bless $self, $class;
23 0 my ($parser) = @_;
24 0 $self->{key} = 'c_literal';
25 0 $self->{symbtab} = $parser->YYData->{symbtab};
26 0 return $self;
27 }
28
29 0 ▶sub _get_defn {
Subroutine _get_defn: not called CC=2 SCAR=17.9
30 0 my $self = shift;
31 0 my ($defn) = @_;
32 0 ▶ if (ref $defn) {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $defn) { } 0 0 0
33 0 return $defn;
34 }
35 else {
36 0 return $self->{symbtab}->Lookup($defn);
37 }
38 }
39
40 #
41 # 3.5 OMG IDL Specification
42 #
43
44 0 ▶sub visitSpecification {
Subroutine visitSpecification: not called CC=4 SCAR=30.0
Pod undocumented
45 0 my $self = shift;
46 0 my ($node) = @_;
47 0 ▶ if (exists $node->{list_import}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $node->{"list_import"}) 0 0 0
48 0 foreach (@{$node->{list_import}}) {
49 0 $_->visit($self);
50 }
51 }
52 0 foreach (@{$node->{list_export}}) {
53 0 $self->_get_defn($_)->visit($self);
54 }
55 }
56
57 #
58 # 3.6 Import Declaration
59 #
60
61 0 ▶sub visitImport {
Subroutine visitImport: not called CC=2 SCAR=17.9
Pod undocumented
62 0 my $self = shift;
63 0 my ($node) = @_;
64 0 foreach (@{$node->{list_decl}}) {
65 0 $self->_get_defn($_)->visit($self);
66 }
67 }
68
69 #
70 # 3.7 Module Declaration
71 #
72
73 0 ▶sub visitModules {
Subroutine visitModules: not called CC=2 SCAR=17.9
Pod undocumented
74 0 my $self = shift;
75 0 my ($node) = @_;
76 0 foreach (@{$node->{list_export}}) {
77 0 $self->_get_defn($_)->visit($self);
78 }
79 }
80
81 #
82 # 3.8 Interface Declaration
83 #
84
85 0 ▶sub visitBaseInterface {
Subroutine visitBaseInterface: not called CC=3 SCAR=24.8
Pod undocumented
86 0 my $self = shift;
87 0 my ($node) = @_;
88 0 ▶ return if (exists $node->{$self->{key}});
Branch: 1 branch
BranchTrueFalseTotal
if exists $$node{$self->{"key"}} 0 0 0
89 0 $node->{$self->{key}} = 1;
90 0 foreach (@{$node->{list_export}}) {
91 0 $self->_get_defn($_)->visit($self);
92 }
93 }
94
95 0 ▶sub visitForwardBaseInterface {
Subroutine visitForwardBaseInterface: not called CC=1 SCAR=0.0
Pod undocumented
96 # empty
97 }
98
99 #
100 # 3.9 Value Declaration
101 #
102
103 0 ▶sub visitStateMember {
Subroutine visitStateMember: not called CC=3 SCAR=24.8
Pod undocumented
104 # C mapping is aligned with CORBA 2.1
105 0 my $self = shift;
106 0 my ($node) = @_;
107 0 my $type = $self->_get_defn($node->{type});
108 0 $type->visit($self);
109 0 ▶ if (exists $node->{array_size}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $node->{"array_size"}) 0 0 0
110 0 foreach (@{$node->{array_size}}) {
111 0 $_->visit($self); # expression
112 }
113 }
114 }
115
116 0 ▶sub visitInitializer {
Subroutine visitInitializer: not called CC=2 SCAR=17.9
Pod undocumented
117 # C mapping is aligned with CORBA 2.1
118 0 my $self = shift;
119 0 my ($node) = @_;
120 0 foreach (@{$node->{list_param}}) {
121 0 $_->visit($self); # parameter
122 }
123 }
124
125 #
126 # 3.10 Constant Declaration
127 #
128
129 0 ▶sub visitConstant {
Subroutine visitConstant: not called CC=1 SCAR=6.9
Pod undocumented
130 0 my $self = shift;
131 0 my ($node) = @_;
132 0 $node->{value}->visit($self); # expression
133 }
134
135 0 ▶sub _Eval {
Subroutine _Eval: not called CC=8 SCAR=42.8
136 0 my $self = shift;
137 0 my ($list_expr, $type) = @_;
138 0 my $elt = $self->_get_defn(pop @{$list_expr});
139 0 ▶ if ( $elt->isa('BinaryOp') ) {
Branch: 5 branches
BranchTrueFalseTotal
if ($elt->isa('BinaryOp')) { } 0 0 0
elsif ($elt->isa('UnaryOp')) { } 0 0 0
elsif ($elt->isa('Constant')) { } 0 0 0
elsif ($elt->isa('Enum')) { } 0 0 0
elsif ($elt->isa('Literal')) { } 0 0 0
140 0 my $right = $self->_Eval($list_expr, $type);
141 0 ▶ if ( $elt->{op} eq '>>'
Branch: 1 branch
BranchTrueFalseTotal
if ($elt->{"op"} eq ">>" or $elt->{"op"} eq "<<") 0 0 0
Condition0%0/3
$elt->{"op"} eq ">>" or $elt->{"op"} eq "<<"
l!l&&r!l&&!r
000
MC/DC0%0/2
$elt->{"op"} eq ">>" or $elt->{"op"} eq "<<"
$elt->{"op"} eq ">>" $elt->{"op"} eq "<<"
Truth table0%0/3
A or B
A= $elt->{"op"} eq ">>"B= $elt->{"op"} eq "<<"
ABresult
1X1
011
000
142 or $elt->{op} eq '<<' ) {
143 0 $right =~ s/[LU]+$//;
144 }
145 0 my $left = $self->_Eval($list_expr, $type);
146 0 return '(' . $left . q{ } . $elt->{op} . q{ } . $right . ')';
147 }
148 elsif ( $elt->isa('UnaryOp') ) {
149 0 my $right = $self->_Eval($list_expr, $type);
150 0 return $elt->{op} . $right;
151 }
152 elsif ( $elt->isa('Constant') ) {
153 0 return $elt->{c_name};
154 }
155 elsif ( $elt->isa('Enum') ) {
156 0 return $elt->{c_name};
157 }
158 elsif ( $elt->isa('Literal') ) {
159 0 $elt->visit($self, $type);
160 0 return $elt->{$self->{key}};
161 }
162 else {
163 0 warn __PACKAGE__,"::_Eval: INTERNAL ERROR ",ref $elt,".\n";
164 0 return undef;
165 }
166 }
167
168 0 ▶sub visitExpression {
Subroutine visitExpression: not called CC=2 SCAR=17.9
Pod undocumented
169 0 my $self = shift;
170 0 my ($node) = @_;
171 0 my @list_expr = @{$node->{list_expr}}; # create a copy
172 0 my $type = $self->_get_defn($node->{type});
173 0 ▶ while ($type->isa('TypeDeclarator')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($type->isa("TypeDeclarator")) 0 0 0
174 0 $type = $self->_get_defn($type->{type});
175 }
176 0 $node->{$self->{key}} = $self->_Eval(\@list_expr, $type);
177 }
178
179 0 ▶sub visitIntegerLiteral {
Subroutine visitIntegerLiteral: not called CC=18 SCAR=58.3
Pod undocumented
180 0 my $self = shift;
181 0 my ($node, $type) = @_;
182 0 my $str = $node->{value};
183 0 $str =~ s/^\+//;
184 0 ▶ unless (exists $type->{auto}) {
Branch: 1 branch
BranchTrueFalseTotal
unless (exists $type->{"auto"}) 0 0 0
185 0 ▶ if ($node->{lexeme} =~ /^0+$/) {
Branch: 3 branches
BranchTrueFalseTotal
if ($node->{'lexeme'} =~ /^0+$/) { } 0 0 0
elsif ($node->{'lexeme'} =~ /^0[Xx]/) { } 0 0 0
elsif ($node->{'lexeme'} =~ /^0/) { } 0 0 0
186 0 $str = '0';
187 }
188 elsif ($node->{lexeme} =~ /^0[Xx]/) {
189 0 my $fmt;
190 0 ▶ if ($type->{value} eq 'octet') {
Branch: 7 branches
BranchTrueFalseTotal
if ($type->{'value'} eq 'octet') { } 0 0 0
elsif ($type->{'value'} eq 'short') { } 0 0 0
elsif ($type->{'value'} eq 'unsigned short') { } 0 0 0
elsif ($type->{'value'} eq 'long') { } 0 0 0
elsif ($type->{'value'} eq 'unsigned long') { } 0 0 0
elsif ($type->{'value'} eq 'long long') { } 0 0 0
elsif ($type->{'value'} eq 'unsigned long long') { } 0 0 0
191 0 $fmt = '0x%02x';
192 }
193 elsif ( $type->{value} eq 'short' ) {
194 0 $fmt = '0x%04x';
195 }
196 elsif ( $type->{value} eq 'unsigned short' ) {
197 0 $fmt = '0x%04x';
198 }
199 elsif ( $type->{value} eq 'long' ) {
200 0 $fmt = '0x%08x';
201 }
202 elsif ( $type->{value} eq 'unsigned long' ) {
203 0 $fmt = '0x%08x';
204 }
205 elsif ( $type->{value} eq 'long long' ) {
206 0 $fmt = '0x%016x';
207 }
208 elsif ( $type->{value} eq 'unsigned long long' ) {
209 0 $fmt = '0x%016x';
210 }
211 0 $str = sprintf($fmt, $node->{value});
212 }
213 elsif ($node->{lexeme} =~ /^0/) {
214 0 $str = sprintf('0%o', $node->{value});
215 }
216 else {
217 0 $str = sprintf('%d', $node->{value});
218 }
219 0 ▶ if ( $type->{value} eq 'short' ) {
Branch: 6 branches
BranchTrueFalseTotal
if ($type->{'value'} eq 'short') { } 0 0 0
elsif ($type->{'value'} eq 'unsigned short') { } 0 0 0
elsif ($type->{'value'} eq 'long') { } 0 0 0
elsif ($type->{'value'} eq 'unsigned long') { } 0 0 0
elsif ($type->{'value'} eq 'long long') { } 0 0 0
elsif ($type->{'value'} eq 'unsigned long long') { } 0 0 0
220 0 $str = '(short)' . $str;
221 }
222 elsif ( $type->{value} eq 'unsigned short' ) {
223 0 $str = '(unsigned short)' . $str . 'U';
224 }
225 elsif ( $type->{value} eq 'long' ) {
226 0 $str .= 'L';
227 }
228 elsif ( $type->{value} eq 'unsigned long' ) {
229 0 $str .= 'UL';
230 }
231 elsif ( $type->{value} eq 'long long' ) {
232 0 $str .= 'LL';
233 }
234 elsif ( $type->{value} eq 'unsigned long long' ) {
235 0 $str .= 'ULL';
236 }
237 }
238 0 $node->{$self->{key}} = $str;
239 }
240
241 0 ▶sub visitStringLiteral {
Subroutine visitStringLiteral: not called CC=4 SCAR=30.0
Pod undocumented
242 0 my $self = shift;
243 0 my ($node) = @_;
244 0 my @list = unpack 'C*', $node->{value};
245 0 my $str = q{"};
246 0 foreach (@list) {
247 0 ▶ if ($_ < 32 or $_ >= 128) {
Branch: 1 branch
BranchTrueFalseTotal
if ($_ < 32 or $_ >= 128) { } 0 0 0
Condition0%0/3
$_ < 32 or $_ >= 128
l!l&&r!l&&!r
000
MC/DC0%0/2
$_ < 32 or $_ >= 128
$_ < 32 $_ >= 128
Truth table0%0/3
A or B
A= $_ < 32B= $_ >= 128
ABresult
1X1
011
000
248 0 $str .= sprintf "\\x%02x", $_;
249 }
250 else {
251 0 $str .= chr $_;
252 }
253 }
254 0 $str .= q{"};
255 0 $node->{$self->{key}} = $str;
256 }
257
258 0 ▶sub visitWideStringLiteral {
Subroutine visitWideStringLiteral: not called CC=6 SCAR=37.4
Pod undocumented
259 0 my $self = shift;
260 0 my ($node) = @_;
261 0 my @list = unpack 'C*', $node->{value};
262 0 my $str = q{L"};
263 0 foreach (@list) {
264 0 ▶ if ($_ < 32 or ($_ >= 128 and $_ < 256)) {
Branch: 2 branches
BranchTrueFalseTotal
if ($_ < 32 or $_ >= 128 and $_ < 256) { } 0 0 0
elsif ($_ >= 256) { } 0 0 0
Condition0%0/6
$_ < 32 or $_ >= 128 and $_ < 256
l!l&&r!l&&!r
000
$_ >= 128 and $_ < 256
!ll&&!rl&&r
000
MC/DC0%0/3
$_ < 32 or $_ >= 128 and $_ < 256
$_ < 32 $_ >= 128 $_ < 256
Truth table0%0/4
A or B and C
A= $_ < 32B= $_ >= 128C= $_ < 256
ABCresult
1XX1
0111
00X0
0100
265 0 $str .= sprintf "\\x%02x", $_;
266 }
267 elsif ($_ >= 256) {
268 0 $str .= sprintf "\\u%04x", $_;
269 }
270 else {
271 0 $str .= chr $_;
272 }
273 }
274 0 $str .= q{"};
275 0 $node->{$self->{key}} = $str;
276 }
277
278 0 ▶sub visitCharacterLiteral {
Subroutine visitCharacterLiteral: not called CC=3 SCAR=24.8
Pod undocumented
279 0 my $self = shift;
280 0 my ($node) = @_;
281 0 my @list = unpack 'C', $node->{value};
282 0 my $c = $list[0];
283 0 my $str = q{'};
284 0 ▶ if ($c < 32 or $c >= 128) {
Branch: 1 branch
BranchTrueFalseTotal
if ($c < 32 or $c >= 128) { } 0 0 0
Condition0%0/3
$c < 32 or $c >= 128
l!l&&r!l&&!r
000
MC/DC0%0/2
$c < 32 or $c >= 128
$c < 32 $c >= 128
Truth table0%0/3
A or B
A= $c < 32B= $c >= 128
ABresult
1X1
011
000
285 0 $str .= sprintf "\\x%02x", $c;
286 }
287 else {
288 0 $str .= chr $c;
289 }
290 0 $str .= q{'};
291 0 $node->{$self->{key}} = $str;
292 }
293
294 0 ▶sub visitWideCharacterLiteral {
Subroutine visitWideCharacterLiteral: not called CC=5 SCAR=34.0
Pod undocumented
295 0 my $self = shift;
296 0 my ($node) = @_;
297 0 my @list = unpack 'C', $node->{value};
298 0 my $c = $list[0];
299 0 my $str = q{L'};
300 0 ▶ if ($c < 32 or ($c >= 128 and $c < 256)) {
Branch: 2 branches
BranchTrueFalseTotal
if ($c < 32 or $c >= 128 and $c < 256) { } 0 0 0
elsif ($c >= 256) { } 0 0 0
Condition0%0/6
$c < 32 or $c >= 128 and $c < 256
l!l&&r!l&&!r
000
$c >= 128 and $c < 256
!ll&&!rl&&r
000
MC/DC0%0/3
$c < 32 or $c >= 128 and $c < 256
$c < 32 $c >= 128 $c < 256
Truth table0%0/4
A or B and C
A= $c < 32B= $c >= 128C= $c < 256
ABCresult
1XX1
0111
00X0
0100
301 0 $str .= sprintf "\\x%02x", $c;
302 }
303 elsif ($c >= 256) {
304 0 $str .= sprintf "\\u%04x", $c;
305 }
306 else {
307 0 $str .= chr $c;
308 }
309 0 $str .= q{'};
310 0 $node->{$self->{key}} = $str;
311 }
312
313 0 ▶sub visitFixedPtLiteral {
Subroutine visitFixedPtLiteral: not called CC=1 SCAR=6.9
Pod undocumented
314 0 my $self = shift;
315 0 my ($node) = @_;
316 0 my $str = q{"};
317 0 $str .= $node->{value};
318 0 $str .= q{"};
319 0 $node->{$self->{key}} = $str;
320 }
321
322 0 ▶sub visitFloatingPtLiteral {
Subroutine visitFloatingPtLiteral: not called CC=1 SCAR=6.9
Pod undocumented
323 0 my $self = shift;
324 0 my ($node) = @_;
325 0 $node->{$self->{key}} = $node->{value};
326 }
327
328 0 ▶sub visitBooleanLiteral {
Subroutine visitBooleanLiteral: not called CC=2 SCAR=17.9
Pod undocumented
329 0 my $self = shift;
330 0 my ($node) = @_;
331 0 ▶ if ($node->{value} eq 'TRUE') {
Branch: 1 branch
BranchTrueFalseTotal
if ($node->{'value'} eq 'TRUE') { } 0 0 0
332 0 $node->{$self->{key}} = '1';
333 }
334 else {
335 0 $node->{$self->{key}} = '0';
336 }
337 }
338
339 #
340 # 3.11 Type Declaration
341 #
342
343 0 ▶sub visitTypeDeclarator {
Subroutine visitTypeDeclarator: not called CC=3 SCAR=24.8
Pod undocumented
344 0 my $self = shift;
345 0 my ($node) = @_;
346 0 my $type = $self->_get_defn($node->{type});
347 0 $type->visit($self);
348 0 ▶ if (exists $node->{array_size}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $node->{"array_size"}) 0 0 0
349 0 foreach (@{$node->{array_size}}) {
350 0 $_->visit($self); # expression
351 }
352 }
353 }
354
355 0 ▶sub visitNativeType {
Subroutine visitNativeType: not called CC=1 SCAR=0.0
Pod undocumented
356 # empty
357 }
358
359 #
360 # 3.11.1 Basic Types
361 #
362
363 0 ▶sub visitBasicType {
Subroutine visitBasicType: not called CC=1 SCAR=0.0
Pod undocumented
364 # empty
365 }
366
367 0 ▶sub visitAnyType {
Subroutine visitAnyType: not called CC=1 SCAR=0.0
Pod undocumented
368 # empty
369 }
370
371 #
372 # 3.11.2 Constructed Types
373 #
374 # 3.11.2.1 Structures
375 #
376
377 0 ▶sub visitStructType {
Subroutine visitStructType: not called CC=3 SCAR=24.8
Pod undocumented
378 0 my $self = shift;
379 0 my ($node) = @_;
380 0 ▶ return if (exists $node->{$self->{key}});
Branch: 1 branch
BranchTrueFalseTotal
if exists $$node{$self->{"key"}} 0 0 0
381 0 $node->{$self->{key}} = 1;
382 0 foreach (@{$node->{list_member}}) {
383 0 $self->_get_defn($_)->visit($self); # member
384 }
385 }
386
387 0 ▶sub visitMember {
Subroutine visitMember: not called CC=3 SCAR=24.8
Pod undocumented
388 0 my $self = shift;
389 0 my ($node) = @_;
390 0 my $type = $self->_get_defn($node->{type});
391 0 $type->visit($self);
392 0 ▶ if (exists $node->{array_size}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $node->{"array_size"}) 0 0 0
393 0 foreach (@{$node->{array_size}}) {
394 0 $_->visit($self); # expression
395 }
396 }
397 }
398
399 # 3.11.2.2 Discriminated Unions
400 #
401
402 0 ▶sub visitUnionType {
Subroutine visitUnionType: not called CC=3 SCAR=24.8
Pod undocumented
403 0 my $self = shift;
404 0 my ($node) = @_;
405 0 ▶ return if (exists $node->{$self->{key}});
Branch: 1 branch
BranchTrueFalseTotal
if exists $$node{$self->{"key"}} 0 0 0
406 0 $node->{$self->{key}} = 1;
407 0 my $type = $self->_get_defn($node->{type});
408 0 $type->visit($self);
409 0 foreach (@{$node->{list_expr}}) {
410 0 $_->visit($self); # case
411 }
412 }
413
414 0 ▶sub visitCase {
Subroutine visitCase: not called CC=2 SCAR=17.9
Pod undocumented
415 0 my $self = shift;
416 0 my ($node) = @_;
417 0 foreach (@{$node->{list_label}}) {
418 0 $_->visit($self); # default or expression
419 }
420 0 $node->{element}->visit($self);
421 }
422
423 0 ▶sub visitDefault {
Subroutine visitDefault: not called CC=1 SCAR=0.0
Pod undocumented
424 # empty
425 }
426
427 0 ▶sub visitElement {
Subroutine visitElement: not called CC=1 SCAR=6.9
Pod undocumented
428 0 my $self = shift;
429 0 my ($node) = @_;
430 0 $self->_get_defn($node->{value})->visit($self); # member
431 }
432
433 # 3.11.2.4 Enumerations
434 #
435
436 0 ▶sub visitEnumType {
Subroutine visitEnumType: not called CC=2 SCAR=17.9
Pod undocumented
437 0 my $self = shift;
438 0 my ($node) = @_;
439 0 foreach (@{$node->{list_expr}}) {
440 0 $_->visit($self); # enum
441 }
442 }
443
444 0 ▶sub visitEnum {
Subroutine visitEnum: not called CC=1 SCAR=6.9
Pod undocumented
445 0 my $self = shift;
446 0 my ($node) = @_;
447 0 $node->{$self->{key}} = $node->{value};
448 }
449
450 #
451 # 3.11.3 Template Types
452 #
453
454 0 ▶sub visitSequenceType {
Subroutine visitSequenceType: not called CC=2 SCAR=17.9
Pod undocumented
455 0 my $self = shift;
456 0 my ($node) = @_;
457 0 my $type = $self->_get_defn($node->{type});
458 0 $type->visit($self);
459 0 ▶ $node->{max}->visit($self) if (exists $node->{max});
Branch: 1 branch
BranchTrueFalseTotal
if exists $node->{"max"} 0 0 0
460 }
461
462 0 ▶sub visitStringType {
Subroutine visitStringType: not called CC=2 SCAR=17.9
Pod undocumented
463 0 my $self = shift;
464 0 my ($node) = @_;
465 0 ▶ $node->{max}->visit($self) if (exists $node->{max});
Branch: 1 branch
BranchTrueFalseTotal
if exists $node->{"max"} 0 0 0
466 }
467
468 0 ▶sub visitWideStringType {
Subroutine visitWideStringType: not called CC=2 SCAR=17.9
Pod undocumented
469 0 my $self = shift;
470 0 my ($node) = @_;
471 0 ▶ $node->{max}->visit($self) if (exists $node->{max});
Branch: 1 branch
BranchTrueFalseTotal
if exists $node->{"max"} 0 0 0
472 }
473
474 0 ▶sub visitFixedPtType {
Subroutine visitFixedPtType: not called CC=1 SCAR=6.9
Pod undocumented
475 0 my $self = shift;
476 0 my ($node) = @_;
477 0 $node->{d}->visit($self);
478 0 $node->{s}->visit($self);
479 }
480
481 0 ▶sub visitFixedPtConstType {
Subroutine visitFixedPtConstType: not called CC=1 SCAR=0.0
Pod undocumented
482 # empty
483 }
484
485 #
486 # 3.12 Exception Declaration
487 #
488
489 0 ▶sub visitException {
Subroutine visitException: not called CC=2 SCAR=17.9
Pod undocumented
490 0 my $self = shift;
491 0 my ($node) = @_;
492 0 foreach (@{$node->{list_member}}) {
493 0 $self->_get_defn($_)->visit($self); # member
494 }
495 }
496
497 #
498 # 3.13 Operation Declaration
499 #
500
501 0 ▶sub visitOperation {
Subroutine visitOperation: not called CC=2 SCAR=17.9
Pod undocumented
502 0 my $self = shift;
503 0 my ($node) = @_;
504 0 my $type = $self->_get_defn($node->{type}); # param_type_spec or void
505 0 $type->visit($self);
506 0 foreach (@{$node->{list_param}}) {
507 0 $_->visit($self); # parameter
508 }
509 }
510
511 0 ▶sub visitParameter {
Subroutine visitParameter: not called CC=1 SCAR=6.9
Pod undocumented
512 0 my $self = shift;
513 0 my ($node) = @_;
514 0 my $type = $self->_get_defn($node->{type}); # param_type_spec
515 0 $type->visit($self);
516 }
517
518 0 ▶sub visitVoidType {
Subroutine visitVoidType: not called CC=1 SCAR=0.0
Pod undocumented
519 # empty
520 }
521
522 #
523 # 3.14 Attribute Declaration
524 #
525
526 0 ▶sub visitAttribute {
Subroutine visitAttribute: not called CC=1 SCAR=6.9
Pod undocumented
527 0 my $self = shift;
528 0 my ($node) = @_;
529 0 my $type = $self->_get_defn($node->{type}); # param_type_spec
530 0 $type->visit($self);
531 }
532
533 #
534 # 3.15 Repository Identity Related Declarations
535 #
536
537 0 ▶sub visitTypeId {
Subroutine visitTypeId: not called CC=1 SCAR=0.0
Pod undocumented
538 # empty
539 }
540
541 0 ▶sub visitTypePrefix {
Subroutine visitTypePrefix: not called CC=1 SCAR=0.0
Pod undocumented
542 # empty
543 }
544
545 #
546 # 3.16 Event Declaration
547 #
548
549 #
550 # 3.17 Component Declaration
551 #
552
553 0 ▶sub visitProvides {
Subroutine visitProvides: not called CC=1 SCAR=0.0
Pod undocumented
554 # empty
555 }
556
557 0 ▶sub visitUses {
Subroutine visitUses: not called CC=1 SCAR=0.0
Pod undocumented
558 # empty
559 }
560
561 0 ▶sub visitPublishes {
Subroutine visitPublishes: not called CC=1 SCAR=0.0
Pod undocumented
562 # empty
563 }
564
565 0 ▶sub visitEmits {
Subroutine visitEmits: not called CC=1 SCAR=0.0
Pod undocumented
566 # empty
567 }
568
569 0 ▶sub visitConsumes {
Subroutine visitConsumes: not called CC=1 SCAR=0.0
Pod undocumented
570 # empty
571 }
572
573 #
574 # 3.18 Home Declaration
575 #
576
577 0 ▶sub visitFactory {
Subroutine visitFactory: not called CC=2 SCAR=17.9
Pod undocumented
578 # C mapping is aligned with CORBA 2.1
579 0 my $self = shift;
580 0 my ($node) = @_;
581 0 foreach (@{$node->{list_param}}) {
582 0 $_->visit($self); # parameter
583 }
584 }
585
586 0 ▶sub visitFinder {
Subroutine visitFinder: not called CC=2 SCAR=17.9
Pod undocumented
587 # C mapping is aligned with CORBA 2.1
588 0 my $self = shift;
589 0 my ($node) = @_;
590 0 foreach (@{$node->{list_param}}) {
591 0 $_->visit($self); # parameter
592 }
593 }
594
595 1 1;
596
« C/IncludeVisitor.pm ↑ Summary C/LengthVisitor.pm »