class Savi::AST::Operator

Overview

An Operator is a non-Identifier symbol used in Relate and Prefix nodes, representing the particular operation indicated in those kinds of nodes. The following shows Relate assignment (=) with Prefix consume (--), in the common case of moving an old variable into a new one:

new_var = --old_var ^ ^~

Defined in:

savi/ast.cr

Constructors

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

Constructor Detail

def self.new(value : String) #

[View source]

Instance Method Detail

def name #

[View source]
def to_a : Array(A) #

[View source]
def value : String #

[View source]
def value=(value : String) #

[View source]