line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# Copyright 2011-2012 Yuki Izumi. ( anneli AT cpan DOT org ) |
2
|
|
|
|
|
|
|
# This is free software; you can redistribute it and/or modify it under the |
3
|
|
|
|
|
|
|
# same terms as Perl itself. |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Erlang::Parser::Node::Float; |
6
|
|
|
|
|
|
|
|
7
|
3
|
|
|
3
|
|
13
|
use Moose; |
|
3
|
|
|
|
|
3
|
|
|
3
|
|
|
|
|
19
|
|
8
|
|
|
|
|
|
|
with 'Erlang::Parser::Node'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
has 'float' => (is => 'rw', required => 1, isa => 'Num'); |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub print { |
13
|
304
|
|
|
304
|
1
|
317
|
my ($self, $fh, $depth) = @_; |
14
|
304
|
|
100
|
|
|
436
|
$depth ||= 0; |
15
|
304
|
|
|
|
|
7358
|
print $fh $self->float; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=head1 NAME |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
Erlang::Parser::Node::Float - a floating point integer |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=head1 DESCRIPTION |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
A number with decimal places. |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head2 Accessors |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=over 4 |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=item C<float> |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
The value. |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=back |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head2 Methods |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=over 4 |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=item C<print> |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
Pretty-prints the node to its filehandle argument. |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=back |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head1 EXAMPLE |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
4.1 |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=cut |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
1; |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
# vim: set sw=4 ts=4: |