class Mint::Compiler::Renderer
- Mint::Compiler::Renderer
- Reference
- Object
Overview
This class is responsible to render Compiled
code.
Defined in:
compiler/renderer.crConstructors
Instance Method Summary
-
#asset_path : Proc(Ast::Node, String)
A method to get the path of an asset.
-
#base : Set(Ast::Node) | Bundle
The current bundle.
-
#builtins : Set(Mint::Compiler::Builtin)
A set to track used builtins which will be imported.
-
#bundles : Hash(Set(Ast::Node) | Bundle, Set(Ast::Node))
The bundles which we use to get their filename.
-
#class_pool : NamePool(Ast::Node | Builtin, Set(Ast::Node) | Bundle)
The pool for class variables (uppercase).
-
#deferred_path : Proc(Set(Ast::Node) | Bundle, String)
A method to get the deffered path of a bundle.
-
#depth : Int32
The current indentation depth.
-
#depth=(depth : Int32)
The current indentation depth.
- #import(imports : Hash(String, String), optimize : Bool, path : String)
-
#pool : NamePool(Ast::Node | Variable | String | Encoder | Decoder, Set(Ast::Node) | Bundle)
The pool for variables (lowercase).
- #render(items : Compiled, io : IO) : Nil
- #render(items : Compiled) : String
-
#render(item : Item, io : IO = IO::Memory.new)
We are using a string builder to build the final compiled code.
-
#used : Set(Mint::Ast::Node | Mint::Compiler::Decoder | Mint::Compiler::Encoder)
A set to track nodes which we rendered.
Constructor Detail
Instance Method Detail
The bundles which we use to get their filename.
The pool for class variables (uppercase).
A method to get the deffered path of a bundle.
The pool for variables (lowercase).
We are using a string builder to build the final compiled code.
A set to track nodes which we rendered.