class Savi::AST::Identifier
- Savi::AST::Identifier
- Savi::AST::Node
- Reference
- Object
Overview
An Identifier is any "bare word" in the source code, identifying something. In the following example of a local variable declaration whose value comes from a call with arguments, all of the underlined words are identifiers:
example SomeType'val = other_1.find("string", 90, other_2) ^~~~~~~ ^~~~~~~~ ^~~ ^~~~~~~ ^~~~ ^~~~~~~
Defined in:
savi/ast.crConstructors
Instance Method Summary
-
#immediately_nested_within?(outer : AST::Identifier) : AST::Identifier | Nil
If this identifier is immediately dot-nested within the given outer identifier, then return the nested portion as a new identifier.
- #name
- #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
Constructor Detail
Instance Method Detail
If this identifier is immediately dot-nested within the given outer identifier, then return the nested portion as a new identifier.