module Savi::Compiler::Refer

Overview

The purpose of the Refer pass is to resolve identifiers, either as local variables or type declarations/aliases. The resolution of types is deferred to the earlier ReferType pass, on which this pass depends. Just like the earlier ReferType pass, the resolutions of the identifiers are kept as output state available to future passes wishing to retrieve information as to what a given identifier refers. Additionally, this pass tracks and validates some invariants related to references, and raises compilation errors if those forms are invalid.

This pass does not mutate the Program topology. This pass does not mutate the AST. This pass may raise a compilation error. This pass keeps state at the per-type and per-function level. This pass produces output state at the per-type and per-function level.

Defined in:

savi/compiler/refer.cr
savi/compiler/refer/info.cr