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::Variable; |
6
|
|
|
|
|
|
|
|
7
|
3
|
|
|
3
|
|
11
|
use Moose; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
16
|
|
8
|
|
|
|
|
|
|
with 'Erlang::Parser::Node'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
has 'variable' => (is => 'rw', required => 1, isa => 'Str'); |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub print { |
13
|
17994
|
|
|
17994
|
1
|
14990
|
my ($self, $fh, $depth) = @_; |
14
|
17994
|
|
100
|
|
|
27330
|
$depth ||= 0; |
15
|
|
|
|
|
|
|
|
16
|
17994
|
|
|
|
|
423496
|
print $fh $self->variable; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head1 NAME |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
Erlang::Parser::Node::Variable - a variable |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head1 DESCRIPTION |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
Any use or reference to a variable, bound or unbound. |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head2 Accessors |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=over 4 |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=item C<variable> |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
The name of the variable. |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=back |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head2 Methods |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=over 4 |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=item C<print> |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
Pretty-prints the node to its filehandle argument. |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=back |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 EXAMPLE |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
Argument |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=cut |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
1; |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
# vim: set sw=4 ts=4: |