class Savi::AST::LiteralString
- Savi::AST::LiteralString
- Savi::AST::Node
- Reference
- Object
Overview
A LiteralString is a value surrounded by double-quotes in source code, such as the right-hand-side of the assignment in the following example:
example = "example" ^~~~~~~
A LiteralString can have an optional prefix identifier, such as in the
following example demonstrating a byte string (rather than a normal string),
(in this case the prefix_ident is an Identifier pointing to the letter b
):
example = b"example" ^~~~~~~
Defined in:
savi/ast.crConstructors
Instance Method Summary
- #name
- #prefix_ident : Savi::AST::Identifier?
- #prefix_ident=(prefix_ident : Nil | Savi::AST::Identifier)
- #to_a : Array(A)
- #value : String
- #value=(value : String)
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