class Savi::AST::LiteralFloat

Overview

A LiteralFloat is a floating-point-appearing number in the source code, which resolves at parse time to an floating-point value. The presence of a decimal and/or exponent (e/E symbol) the the source code makes a number parse as a LiteralFloat rather than a LiteralInteger:

example_float F32 = -9.9e2 ^~~~~~

Defined in:

savi/ast.cr

Constructors

Instance Method Summary

Instance methods inherited from class Savi::AST::Node

accept(ctx : Compiler::Context, visitor : Visitor)
accept(ctx : Compiler::Context, visitor : CopyOnMutateVisitor)
accept
, annotations : Array(Annotation) | Nil annotations, annotations=(annotations : Array(Annotation) | Nil) annotations=, children_accept(ctx : Compiler::Context, visitor : Visitor)
children_accept(ctx : Compiler::Context, visitor : CopyOnMutateVisitor)
children_accept
, from(other : Node) from, pos pos, pos? : Savi::Source::Pos? pos?, span_pos(source) span_pos, with_pos(pos : Source::Pos) with_pos

Constructor Detail

def self.new(value : Float64) #

[View source]

Instance Method Detail

def name #

[View source]
def to_a : Array(A) #

[View source]
def value : Float64 #

[View source]
def value=(value : Float64) #

[View source]