Class: Rubinius::AST::FloatLiteral
- Defined in:
- lib/compiler/ast/literals.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
Returns the value of attribute value.
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(line, str) ⇒ FloatLiteral
constructor
A new instance of FloatLiteral.
- #to_sexp ⇒ Object
Methods inherited from Node
#ascii_graph, #attributes, #children, match_arguments?, match_send?, #new_block_generator, #new_generator, #node_name, node_name, #pos, #set_child, transform, #transform, transform_comment, transform_kind, transform_kind=, transform_name, #visit, #walk
Constructor Details
#initialize(line, str) ⇒ FloatLiteral
Returns a new instance of FloatLiteral.
39 40 41 42 |
# File 'lib/compiler/ast/literals.rb', line 39 def initialize(line, str) @line = line @value = str.to_f end |
Instance Attribute Details
#value ⇒ Object
Returns the value of attribute value.
37 38 39 |
# File 'lib/compiler/ast/literals.rb', line 37 def value @value end |
Instance Method Details
#to_sexp ⇒ Object
44 45 46 |
# File 'lib/compiler/ast/literals.rb', line 44 def to_sexp [:lit, @value] end |