class Savi::Compiler::Local::Visitor

Defined in:

savi/compiler/local.cr

Constructors

Instance Method Summary

Instance methods inherited from class Savi::AST::Visitor

visit(ctx : Compiler::Context, node : Node) visit, visit_any?(ctx : Compiler::Context, node : Node) visit_any?, visit_children?(ctx : Compiler::Context, node : Node) visit_children?, visit_pre(ctx : Compiler::Context, node : Node) visit_pre

Constructor Detail


[View source]

Instance Method Detail

def analysis : Analysis #

[View source]
def each_possible_predecessor_of(use_site : UseSite, &yield_block : UseSite | Nil -> _) #

[View source]
def each_possible_predecessor_recurse(orig_use_site, by_location, from_block : Flow::Block, seen_cyclic_edges : Array(Int32), &yield_block : UseSite | Nil -> _) #

[View source]
def emit_errors(ctx, member_idents) #

Emit all errors gathered during previous analysis.


[View source]
def flow : Flow::Analysis #

[View source]
def observe(ctx, node : AST::Identifier) #

Handle reading from a local variable.


[View source]
def observe(ctx, node : AST::Relate) #

Handle assigning to or displacing a local variable.


[View source]
def observe(ctx, node : AST::Prefix) #

Handle consuming a local variable.


[View source]
def observe(ctx, node : AST::Try) #

Observing a try entails observing the catch expression if it has one.


[View source]
def observe(ctx, node : AST::Call) #

Observing a call site entails observing any yield parameters.


[View source]
def observe(ctx, node) #

All other node types have no special logic.


[View source]
def observe_param(ctx, node) #

Observing a parameter definition has its own logic.


[View source]
def observe_predecessors(ctx) #

[View source]
def refer : Refer::Analysis #

[View source]
def visit(ctx, node) #

[View source]