Class: CodeTools::AST::ToString
- Inherits:
-
Node
- Object
- Node
- CodeTools::AST::ToString
show all
- Defined in:
- lib/rubinius/ast/values.rb
Instance Attribute Summary collapse
Attributes inherited from Node
#line
Instance Method Summary
collapse
Methods inherited from Node
#ascii_graph, #attributes, #children, #defined, match_arguments?, match_send?, #new_block_generator, #new_generator, #node_name, #or_bytecode, #pos, #set_child, #transform, transform, transform_comment, transform_kind, transform_kind=, transform_name, #visit, #walk
Constructor Details
#initialize(line, value) ⇒ ToString
269
270
271
272
|
# File 'lib/rubinius/ast/values.rb', line 269
def initialize(line, value)
@line = line
@value = value
end
|
Instance Attribute Details
#value ⇒ Object
Returns the value of attribute value.
267
268
269
|
# File 'lib/rubinius/ast/values.rb', line 267
def value
@value
end
|
Instance Method Details
#bytecode(g) ⇒ Object
274
275
276
277
278
279
|
# File 'lib/rubinius/ast/values.rb', line 274
def bytecode(g)
pos(g)
@value.bytecode(g)
g.meta_to_s
end
|
#to_sexp ⇒ Object
287
288
289
290
291
|
# File 'lib/rubinius/ast/values.rb', line 287
def to_sexp
sexp = [:evstr]
sexp << @value.to_sexp if @value
sexp
end
|
#value_defined(g, f) ⇒ Object
281
282
283
284
285
|
# File 'lib/rubinius/ast/values.rb', line 281
def value_defined(g, f)
if @value
@value.value_defined(g, f)
end
end
|