class Savi::AST::LiteralInteger
- Savi::AST::LiteralInteger
- Savi::AST::Node
- Reference
- Object
Overview
A LiteralInteger is an integer-appearing number in the source code, which resolves at parse time to an integer value, including support for explicitly negative numbers, such as in this example (whose value is -99):
example_int I32 = -99 ^~~
Note that because the true inferred types are not yet known at parse-time, this AST type is also used for floating-point values which "look" like integers, such as in the following example:
example_int F32 = -99 ^~~
Defined in:
savi/ast.crConstructors
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