class Savi::AST::LiteralCharacter
- Savi::AST::LiteralCharacter
- Savi::AST::Node
- Reference
- Object
Overview
A LiteralCharacter is similar to a LiteralString, but it uses single-quotes and it resolves at parse time to a single integer value. For example, the following are character literals helping to define an array of bytes (which happen to be 5 ASCII letters followed by a newline byte):
example Array(U8)'val = ['h', 'e', 'l', 'l', 'o', '/n'] ^ ^ ^ ^ ^ ^~
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