Class: IV::Phonic::AST::Node
- Inherits:
-
Object
- Object
- IV::Phonic::AST::Node
show all
- Defined in:
- lib/iv/phonic/ast.rb
Instance Method Summary
collapse
Constructor Details
#initialize(parent, node) ⇒ Node
Returns a new instance of Node.
21
22
23
24
25
26
|
# File 'lib/iv/phonic/ast.rb', line 21
def initialize parent, node
@parent = parent
@program = parent.program
@begin = node[:begin]
@end = node[:end]
end
|
Instance Method Details
#begin_position ⇒ Object
36
37
38
|
# File 'lib/iv/phonic/ast.rb', line 36
def begin_position
@begin
end
|
#end_position ⇒ Object
40
41
42
|
# File 'lib/iv/phonic/ast.rb', line 40
def end_position
@end
end
|
#program ⇒ Object
32
33
34
|
# File 'lib/iv/phonic/ast.rb', line 32
def program
@program
end
|
#source ⇒ Object
28
29
30
|
# File 'lib/iv/phonic/ast.rb', line 28
def source
@program.source
end
|