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
- #append(io : IO, value : String | Char)
-
#asset_path : Proc(Ast::Node, String)
A method to get the path of an asset.
-
#base : Set(Ast::Node) | Bundle
The current bundle.
-
#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).
-
#column : Int32
The current column.
-
#column=(column : Int32)
The current column.
-
#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.
-
#generate_source_maps? : Bool
Whether or not to generate source map mappings.
-
#last_line : Int32
The last line index.
-
#last_line=(last_line : Int32)
The last line index.
-
#line : Int32
The current line.
-
#line=(line : Int32)
The current line.
- #mappings : Deque(Mapping)
- #mappings=(mappings : Deque(Mapping))
-
#pool : NamePool(Ast::Node | Variable | String | Encoder | Decoder | Record, 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.
-
#stack : Deque(Ast::Node)
A mapping and stack for generating source maps.
-
#stack=(stack : Deque(Ast::Node))
A mapping and stack for generating source maps.
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 mapping and stack for generating source maps. We use Deque
because
we push and pop to the stack frequently.
A mapping and stack for generating source maps. We use Deque
because
we push and pop to the stack frequently.