class Savi::Compiler::Populate::ReplaceIdentifiersVisitor

Overview

A simple visitor that can replace specific identifiers with other AST forms. We use this to rewrite type parameter references with their type args.

Defined in:

savi/compiler/populate.cr

Constructors

Class Method Summary

Instance Method Summary

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

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

def self.new(mapping : Hash(String, Savi::AST::Node)) #

[View source]

Class Method Detail

def self.cached_or_run(ctx, f_link, f, mapping, &) : Program::Function #

[View source]

Instance Method Detail

def run(ctx : Context, f_link : Program::Function::Link, f : Program::Function) #

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

[View source]