Class: CodeTools::AST::SymbolLiteral
- Inherits:
-
Node
- Object
- Node
- CodeTools::AST::SymbolLiteral
show all
- Defined in:
- lib/rubinius/code/ast/literals.rb
Instance Attribute Summary collapse
Attributes inherited from Node
#line
Instance Method Summary
collapse
Methods inherited from Node
#ascii_graph, #attributes, #children, 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, #value_defined, #visit, #walk
Constructor Details
204
205
206
207
|
# File 'lib/rubinius/code/ast/literals.rb', line 204
def initialize(line, sym)
@line = line
@value = sym
end
|
Instance Attribute Details
#value ⇒ Object
Returns the value of attribute value.
202
203
204
|
# File 'lib/rubinius/code/ast/literals.rb', line 202
def value
@value
end
|
Instance Method Details
#bytecode(g) ⇒ Object
209
210
211
212
213
|
# File 'lib/rubinius/code/ast/literals.rb', line 209
def bytecode(g)
pos(g)
g.push_literal @value
end
|
#defined(g) ⇒ Object
215
216
217
|
# File 'lib/rubinius/code/ast/literals.rb', line 215
def defined(g)
g.push_literal "expression"
end
|
#to_sexp ⇒ Object
219
220
221
|
# File 'lib/rubinius/code/ast/literals.rb', line 219
def to_sexp
[:lit, @value]
end
|