class Mint::Compiler2::Renderer

Overview

This class is responsible to render Compiled code.

Defined in:

compiler2/renderer.cr

Constructors

Instance Method Summary

Constructor Detail


[View source]

Instance Method Detail

def base : Ast::Node | Bundle #

[View source]
def builtins : Set(Mint::Compiler2::Builtin) #

A set to track used builtins which will be imported.


[View source]
def bundle_path : Proc(Ast::Node | Bundle, String) #

[View source]
def class_pool : NamePool(Ast::Node | Builtin, Ast::Node | Bundle) #

The pool for class variables (uppercase).


[View source]
def deferred_path : Proc(Ast::Node | Bundle, String) #

[View source]
def depth : Int32 #

The current indentation depth.


[View source]
def depth=(depth : Int32) #

The current indentation depth.


[View source]
def import(imports : Hash(String, String), optimize : Bool, path : String) #

[View source]

The pool for variables (lowercase).


[View source]
def references : ReferencesTracker #

[View source]
def render(items : Compiled, io : IO) #

[View source]
def render(items : Compiled) : String #

[View source]
def render(item : Item, io : IO = IO::Memory.new) #

We are using a string builder to build the final compiled code.


[View source]

A set to track nodes which we rendered.


[View source]