class Savi::AST::ComposeString
- Savi::AST::ComposeString
- Savi::AST::Node
- Reference
- Object
Overview
A ComposeString is surrounded by double-quotes in source code much like a LiteralString, but rather than having a single static value, it is composed of some number of static string values (each a LiteralString) and some number of expressions bounded by escaped parentheses (each a Group). Together these static values and dynamic values are the list of terms.
example = "color: (color_value), size: (size_value)" ^~~~~~~ ^~~~~~~~ (static value terms) ^~~~~~~~~~~~~ ^~~~~~~~~~~~ (dynamic value terms) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (string compose)
Defined in:
savi/ast.crConstructors
Instance Method Summary
- #children_accept(ctx : Compiler::Context, visitor : Visitor)
- #children_accept(ctx : Compiler::Context, visitor : CopyOnMutateVisitor)
- #name
- #prefix_ident : Savi::AST::Identifier?
- #prefix_ident=(prefix_ident : Nil | Savi::AST::Identifier)
- #terms : Array(Savi::AST::Node)
- #terms=(terms : Array(Savi::AST::Node))
- #to_a : Array(A)
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