class Mint::ReferencesTracker

Overview

This class tracks links between nodes which gets populated during type checking.

A link is stored as a tuple {node, parent} where node depends on the parent. Eventually this forms a graph, which from we can decide what bundles to construct. To do that we track back each node to it's root node(s) through the links.

Asnyc components and deferred code got their on bundles and any other code which is referenced from multiple sources will get their own bundle.

Defined in:

references_tracker.cr

Instance Method Summary

Instance Method Detail

def add(node, parent) #

[View source]
def bundle?(nodes : Nodes) #

[View source]
def bundle?(node : Ast::Node) #

[View source]
def calculate : Hash(Bundle, Nodes) #

This method calculates bundles from the links.


[View source]
def link(node, parent) #

[View source]
def roots(node : Ast::Node) : Nodes #

This method recursively determines the roots of the node.


[View source]