line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package JavaScript::Code::Expression::Node::Arithmetic;
|
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
11
|
use strict;
|
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
64
|
|
4
|
2
|
|
|
2
|
|
10
|
use vars qw[ $VERSION ];
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
78
|
|
5
|
2
|
|
|
2
|
|
8
|
use base qw[ JavaScript::Code::Expression::Node ];
|
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
1011
|
|
6
|
|
|
|
|
|
|
|
7
|
2
|
|
|
2
|
|
1026
|
use JavaScript::Code::Expression::Arithmetic ();
|
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
97
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
use overload
|
10
|
2
|
|
|
|
|
32
|
'+' => \&addition,
|
11
|
|
|
|
|
|
|
'-' => \&subtraction,
|
12
|
|
|
|
|
|
|
'*' => \&multiplication,
|
13
|
2
|
|
|
2
|
|
11
|
'/' => \&division;
|
|
2
|
|
|
|
|
3
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
$VERSION = '0.08';
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
=head1 NAME
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
JavaScript::Code::Expression::Node::Arithmetic - A Node For JavaScript Arithmetic Expressions
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head1 METHODS
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=head2 $self->addition( ... )
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=cut
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub addition {
|
28
|
0
|
|
|
0
|
1
|
|
return JavaScript::Code::Expression::Arithmetic::addition(@_);
|
29
|
|
|
|
|
|
|
}
|
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head2 $self->subtraction( ... )
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=cut
|
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub subtraction {
|
36
|
0
|
|
|
0
|
1
|
|
return JavaScript::Code::Expression::Arithmetic::subtraction(@_);
|
37
|
|
|
|
|
|
|
}
|
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head2 $self->multiplication( ... )
|
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=cut
|
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub multiplication {
|
44
|
0
|
|
|
0
|
1
|
|
return JavaScript::Code::Expression::Arithmetic::multiplication(@_);
|
45
|
|
|
|
|
|
|
}
|
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head2 $self->division( ... )
|
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=cut
|
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
sub division {
|
52
|
0
|
|
|
0
|
1
|
|
return JavaScript::Code::Expression::Arithmetic::division(@_);
|
53
|
|
|
|
|
|
|
}
|
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 SEE ALSO
|
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
L
|
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head1 AUTHOR
|
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
Sascha Kiefer, C
|
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head1 LICENSE
|
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
This library is free software, you can redistribute it and/or modify it under
|
66
|
|
|
|
|
|
|
the same terms as Perl itself.
|
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=cut
|
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
1;
|
71
|
|
|
|
|
|
|
|