Class: Ikra::AST::FloatLiteralNode
- Defined in:
- lib/ast/nodes.rb,
lib/ast/printer.rb,
lib/ast/visitor.rb
Constant Summary
Constants inherited from TreeNode
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Attributes inherited from Node
Instance Method Summary collapse
- #accept(visitor) ⇒ Object
- #clone ⇒ Object
-
#initialize(value:) ⇒ FloatLiteralNode
constructor
A new instance of FloatLiteralNode.
- #to_s ⇒ Object
Methods inherited from TreeNode
#==, #enclosing_class, #find_behavior_node, #get_type, #is_begin_node?, #merge_union_type, #register_type_change, #replace, #replace_child, #symbol_table
Methods inherited from Node
Constructor Details
#initialize(value:) ⇒ FloatLiteralNode
Returns a new instance of FloatLiteralNode.
388 389 390 |
# File 'lib/ast/nodes.rb', line 388 def initialize(value:) @value = value end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
386 387 388 |
# File 'lib/ast/nodes.rb', line 386 def value @value end |
Instance Method Details
#accept(visitor) ⇒ Object
98 99 100 |
# File 'lib/ast/visitor.rb', line 98 def accept(visitor) visitor.visit_float_node(self) end |
#clone ⇒ Object
392 393 394 |
# File 'lib/ast/nodes.rb', line 392 def clone return FloatLiteralNode.new(value: @value) end |
#to_s ⇒ Object
90 91 92 |
# File 'lib/ast/printer.rb', line 90 def to_s return "<#{value.to_s}>" end |