class Mint::Compiler2
- Mint::Compiler2
- Reference
- Object
Included Modules
Defined in:
compiler2.crcompiler2/decoder.cr
compiler2/encoder.cr
compiler2/js.cr
compiler2/renderer.cr
compiler2/utils.cr
compilers2/access.cr
compilers2/argument.cr
compilers2/array_literal.cr
compilers2/block.cr
compilers2/bool_literal.cr
compilers2/bracket_access.cr
compilers2/builtin.cr
compilers2/call.cr
compilers2/case.cr
compilers2/case_branch.cr
compilers2/component.cr
compilers2/constant.cr
compilers2/decode.cr
compilers2/defer.cr
compilers2/destructuring.cr
compilers2/directives/asset.cr
compilers2/directives/documentation.cr
compilers2/directives/format.cr
compilers2/directives/highlight.cr
compilers2/directives/highlight_file.cr
compilers2/directives/inline.cr
compilers2/directives/svg.cr
compilers2/encode.cr
compilers2/env.cr
compilers2/field.cr
compilers2/field_access.cr
compilers2/for_expression.cr
compilers2/function.cr
compilers2/get.cr
compilers2/here_document.cr
compilers2/html_attribute.cr
compilers2/html_component.cr
compilers2/html_element.cr
compilers2/html_fragment.cr
compilers2/if.cr
compilers2/inline_function.cr
compilers2/interpolation.cr
compilers2/js.cr
compilers2/locale_key.cr
compilers2/map.cr
compilers2/map_field.cr
compilers2/module.cr
compilers2/negated_expression.cr
compilers2/next_call.cr
compilers2/number_literal.cr
compilers2/operation.cr
compilers2/parenthesized_expression.cr
compilers2/pipe.cr
compilers2/provider.cr
compilers2/record.cr
compilers2/record_update.cr
compilers2/regexp_literal.cr
compilers2/return_call.cr
compilers2/route.cr
compilers2/state.cr
compilers2/state_setter.cr
compilers2/statement.cr
compilers2/store.cr
compilers2/string.cr
compilers2/string_literal.cr
compilers2/suite.cr
compilers2/test.cr
compilers2/tuple_literal.cr
compilers2/type_definition.cr
compilers2/unary_minus.cr
compilers2/variable.cr
utils/markd_vdom_renderer2.cr
Constructors
Class Method Summary
Instance Method Summary
-
#add(node : Ast::Node, id : Id, value : Compiled)
Adds a compiled entity.
-
#add(items : Array(Tuple(Ast::Node, Id, Compiled) | Nil))
Adds multiple compiled entities.
-
#artifacts : TypeChecker::Artifacts
The type checker artifacts.
- #ast(*args, **options)
- #ast(*args, **options, &)
- #cache(*args, **options)
- #cache(*args, **options, &)
- #compile(items : Array(Ast::CssDefinition), block : Proc(String, String) | Nil) : Compiled
-
#compile(nodes : Array(Ast::Node), separator : String) : Compiled
Compiles multiple nodes and joins them with the separator.
- #compile(node : Ast::Access) : Compiled
- #compile(node : Ast::Argument) : Compiled
- #compile(node : Ast::ArrayLiteral) : Compiled
- #compile(node : Ast::Block, for_function = false) : Compiled
- #compile(node : Ast::BoolLiteral) : Compiled
- #compile(node : Ast::BracketAccess) : Compiled
- #compile(node : Ast::Builtin) : Compiled
- #compile(node : Ast::Call) : Compiled
- #compile(node : Ast::Case, block : Proc(String, String) | Nil = nil) : Compiled
- #compile(node : Ast::CaseBranch, block : Proc(String, String) | Nil = nil) : Compiled
- #compile(node : Ast::Decode) : Compiled
- #compile(node : Ast::Defer) : Compiled
- #compile(node : Ast::Encode) : Compiled
- #compile(node : Ast::Env) : Compiled
- #compile(node : Ast::Field)
- #compile(node : Ast::FieldAccess) : Compiled
- #compile(node : Ast::For) : Compiled
- #compile(node : Ast::Function)
- #compile(node : Ast::HereDocument) : Compiled
- #compile(node : Ast::HtmlComponent) : Compiled
- #compile(node : Ast::HtmlElement) : Compiled
- #compile(node : Ast::HtmlFragment) : Compiled
- #compile(node : Ast::If, block : Proc(String, String) | Nil = nil) : Compiled
- #compile(node : Ast::InlineFunction) : Compiled
- #compile(node : Ast::Interpolation) : Compiled
- #compile(node : Ast::Js) : Compiled
- #compile(node : Ast::LocaleKey) : Compiled
- #compile(node : Ast::Map) : Compiled
- #compile(node : Ast::MapField)
- #compile(node : Ast::NegatedExpression) : Compiled
- #compile(node : Ast::NextCall) : Compiled
- #compile(node : Ast::NumberLiteral) : Compiled
- #compile(node : Ast::Operation) : Compiled
- #compile(node : Ast::ParenthesizedExpression) : Compiled
- #compile(node : Ast::Pipe) : Compiled
- #compile(node : Ast::Record) : Compiled
- #compile(node : Ast::RecordUpdate) : Compiled
- #compile(node : Ast::RegexpLiteral) : Compiled
- #compile(node : Ast::ReturnCall) : Compiled
- #compile(node : Ast::Route) : Compiled
- #compile(node : Ast::StateSetter) : Compiled
- #compile(node : Ast::Statement) : Compiled
- #compile(value : String) : Compiled
- #compile(node : Ast::StringLiteral, quote : Bool = false) : Compiled
- #compile(node : Ast::Suite) : Compiled
- #compile(node : Ast::Test) : Compiled
- #compile(node : Ast::TupleLiteral) : Compiled
- #compile(node : Ast::UnaryMinus) : Compiled
- #compile(node : Ast::Variable) : Compiled
- #compile(node : Ast::Directives::Asset) : Compiled
- #compile(node : Ast::Directives::Documentation) : Compiled
- #compile(node : Ast::Directives::Format) : Compiled
- #compile(node : Ast::Directives::Highlight) : Compiled
- #compile(node : Ast::Directives::HighlightFile) : Compiled
- #compile(node : Ast::Directives::Inline) : Compiled
- #compile(node : Ast::Directives::Svg) : Compiled
-
#compile(nodes : Array(Ast::Node)) : Array(Compiled)
Compiles multiple nodes.
-
#compile(node : Ast::Node) : Compiled
Fallback for compiling a node.
- #compile(node : Ast::Function, *, contents : Compiled | Nil = nil, args : Array(Compiled) | Nil = nil, skip_const : Bool = false) : Compiled
- #compile(value : Array(Ast::Node | String), *, quote_string : Bool = false) : Compiled
-
#compile(node : Ast::Node, &) : Compiled
Compiles a node.
-
#compiled : Array({Mint::Ast::Node, Mint::Ast::Node | Mint::Compiler2::Decoder | Mint::Compiler2::Encoder | Mint::Compiler2::Variable, Array(Mint::Ast::Node | Mint::Compiler2::Asset | Mint::Compiler2::Builtin | Mint::Compiler2::Decoder | Mint::Compiler2::Deferred | Mint::Compiler2::Encoder | Mint::Compiler2::Indent | Mint::Compiler2::Raw | Mint::Compiler2::Ref | Mint::Compiler2::Signal | Mint::Compiler2::Variable | String)})
Contains the compiled JavaScript tree.
- #components_touched(*args, **options)
- #components_touched(*args, **options, &)
-
#config : Bundler::Config
The compiler config.
- #decoder(type : TypeChecker::Record)
- #decoder(type : TypeChecker::Type) : Compiled
- #decoder(node : TypeChecker::Variable)
-
#decoders : Hash(Mint::TypeChecker::Record | Mint::TypeChecker::Type | Mint::TypeChecker::Variable, Array(Mint::Ast::Node | Mint::Compiler2::Asset | Mint::Compiler2::Builtin | Mint::Compiler2::Decoder | Mint::Compiler2::Deferred | Mint::Compiler2::Encoder | Mint::Compiler2::Indent | Mint::Compiler2::Raw | Mint::Compiler2::Ref | Mint::Compiler2::Signal | Mint::Compiler2::Variable | String))
Contains the generated decoders.
- #defer(node : Ast::Node, compiled : Compiled)
- #destructuring(node : Ast::ArrayDestructuring, variables : Array(Compiled)) : Compiled
- #destructuring(node : Ast::TupleDestructuring, variables : Array(Compiled)) : Compiled
- #destructuring(node : Ast::Variable, variables : Array(Compiled)) : Compiled
- #destructuring(node : Ast::Spread, variables : Array(Compiled)) : Compiled
- #destructuring(node : Ast::TypeDestructuring, variables : Array(Compiled)) : Compiled
- #destructuring(node : Ast::Node, variables : Array(Compiled)) : Compiled
- #destructuring(node : Nil, variables : Array(Compiled)) : Compiled
- #encoder(type : TypeChecker::Record) : Compiled
- #encoder(type : TypeChecker::Type) : Compiled
- #encoder(node : TypeChecker::Variable)
-
#encoders : Hash(Mint::TypeChecker::Record | Mint::TypeChecker::Type | Mint::TypeChecker::Variable, Array(Mint::Ast::Node | Mint::Compiler2::Asset | Mint::Compiler2::Builtin | Mint::Compiler2::Decoder | Mint::Compiler2::Deferred | Mint::Compiler2::Encoder | Mint::Compiler2::Indent | Mint::Compiler2::Raw | Mint::Compiler2::Ref | Mint::Compiler2::Signal | Mint::Compiler2::Variable | String))
Contains the generated encoders.
- #err
- #inject_css(css : String)
-
#js : Js
The JavaScript builder instance.
- #just
- #lookups(*args, **options)
- #lookups(*args, **options, &)
- #main
- #match(condition : Ast::Node, branches : Array(Tuple(Ast::Node | Nil, Compiled)), await : Bool) : Compiled
- #maybe
- #nothing
- #ok
- #parse_svg(contents)
-
#program
Compiles the program call.
- #record_field_lookup(*args, **options)
- #record_field_lookup(*args, **options, &)
- #resolve(node : Ast::Component)
- #resolve(node : Ast::Constant)
- #resolve(node : Ast::Field) : Hash(Item, Compiled)
- #resolve(node : Ast::Function)
- #resolve(node : Ast::Get)
- #resolve(node : Ast::Module)
- #resolve(node : Ast::Provider)
- #resolve(node : Ast::State)
- #resolve(node : Ast::Store)
- #resolve(node : Ast::TypeDefinition)
-
#resolve(nodes : Array(Ast::Node))
Resolves top-level nodes.
-
#resolve(node : Ast::Node)
Fallback resolving nodes.
- #resolve(node : Ast::HtmlAttribute, *, is_element = true) : Hash(Item, Compiled)
-
#resolve(node : Ast::Node, &)
Resolves a top-level node.
- #resolve_order(*args, **options)
- #resolve_order(*args, **options, &)
- #result
-
#style_builder : StyleBuilder
The style builder instance.
-
#test(url, id)
Compile test runner.
- #tokenize(ast : Ast)
-
#touched : Set(Ast::Node)
A set to track already rendered nodes.
-
#translations
Translations
- #variables(*args, **options)
- #variables(*args, **options, &)
Instance methods inherited from module Mint::Helpers
async?(node : Ast::Node) : Bool
async?,
covers?(node : Ast::ArrayDestructuring, length : Int32) : Bool
covers?,
exhaustive?(node : Ast::Node) : Bool
exhaustive?,
owns?(node : Ast::Node, parent : Ast::Node) : Bool
owns?,
spread?(node : Ast::ArrayDestructuring) : Bool
spread?,
static?(nodes : Array(Ast::Node)) : Boolstatic?(node : Ast::Node | Nil) : Bool static?, static_value(nodes : Array(Ast::Node), separator : Char | Nil = nil) : String
static_value(node : Ast::Node | Nil) : String | Nil static_value
Constructor Detail
Class Method Detail
Instance Method Detail
Adds multiple compiled entities.
Compiles multiple nodes and joins them with the separator.
Compiles a node. If the node is already compiled or not checked it returns an empty compiled node.
Contains the compiled JavaScript tree.
Contains the generated decoders.
Contains the generated encoders.