Class: Duby::JVM::Types::FloatLiteralNode
- Inherits:
-
AST::Float
- Object
- AST::Node
- AST::Float
- Duby::JVM::Types::FloatLiteralNode
- Defined in:
- lib/duby/jvm/types/factory.rb
Instance Attribute Summary
Attributes included from AST::Literal
Attributes included from AST::Typed
Attributes inherited from AST::Node
#children, #inferred_type, #newline, #parent, #position
Instance Method Summary collapse
Methods inherited from AST::Float
Methods included from AST::Literal
Methods inherited from AST::Node
#<<, ===, #[], #_set_parent, child, child_name, #each, #empty?, #expr?, #initialize, #initialize_copy, #insert, #inspect, #line_number, #log, #precompile, #resolve_if, #resolved!, #resolved?, #simple_name, #temp, #to_s
Constructor Details
This class inherits a constructor from Duby::AST::Float
Instance Method Details
#compile(compiler, expression) ⇒ Object
185 186 187 188 189 |
# File 'lib/duby/jvm/types/factory.rb', line 185 def compile(compiler, expression) if expression inferred_type.literal(compiler.method, @literal) end end |
#infer(typer) ⇒ Object
179 180 181 182 183 |
# File 'lib/duby/jvm/types/factory.rb', line 179 def infer(typer) return @inferred_type if resolved? resolved! @inferred_type = FloatLiteral.new(@literal) end |