Class: Reak::Syntax::Node
- Inherits:
-
Object
show all
- Defined in:
- lib/reak/syntax/node.rb
Class Method Summary
(collapse)
Instance Method Summary
(collapse)
Class Method Details
4
5
6
|
# File 'lib/reak/syntax/node.rb', line 4
def self.unfold
define_method(:unfold?) { true }
end
|
Instance Method Details
23
24
25
|
# File 'lib/reak/syntax/node.rb', line 23
def graph
Rubinius::AST::AsciiGrapher.new(self, Node).print
end
|
- (Object) nested_unclosure
12
13
14
|
# File 'lib/reak/syntax/node.rb', line 12
def nested_unclosure
self
end
|
- (Object) pretty_print(pp)
31
32
33
34
35
36
37
38
39
40
|
# File 'lib/reak/syntax/node.rb', line 31
def pretty_print(pp)
pp.text sprintf('#<%s ', self.class.name)
pp.nest(1) do
pp.seplist(instance_variables) do |var|
pp.text "#{var}="
pp.pp instance_variable_get(var)
end
end
pp.text ">"
end
|
16
17
|
# File 'lib/reak/syntax/node.rb', line 16
def to_sexp
end
|
- (Object) unclosure
8
9
10
|
# File 'lib/reak/syntax/node.rb', line 8
def unclosure
Call.new self, Message.new('value')
end
|
19
20
21
|
# File 'lib/reak/syntax/node.rb', line 19
def unfold?
false
end
|
- (Object) visit(visitor)
27
28
29
|
# File 'lib/reak/syntax/node.rb', line 27
def visit(visitor)
raise NotImplementedError, "Don't know how to visit #{self.inspect}"
end
|