class Mint::Compiler
- Mint::Compiler
- Reference
- Object
Included Modules
Defined in:
compiler.crcompilers/access.cr
compilers/argument.cr
compilers/array_access.cr
compilers/array_literal.cr
compilers/block.cr
compilers/bool_literal.cr
compilers/call.cr
compilers/call_expression.cr
compilers/case.cr
compilers/case_branch.cr
compilers/component.cr
compilers/constant.cr
compilers/decode.cr
compilers/destructuring.cr
compilers/directives/asset.cr
compilers/directives/documentation.cr
compilers/directives/format.cr
compilers/directives/highlight.cr
compilers/directives/inline.cr
compilers/directives/svg.cr
compilers/encode.cr
compilers/enum.cr
compilers/enum_id.cr
compilers/env.cr
compilers/for_expression.cr
compilers/function.cr
compilers/get.cr
compilers/here_doc.cr
compilers/html_attribute.cr
compilers/html_component.cr
compilers/html_element.cr
compilers/html_expression.cr
compilers/html_fragment.cr
compilers/if.cr
compilers/inline_function.cr
compilers/interpolation.cr
compilers/js.cr
compilers/locale_key.cr
compilers/member_access.cr
compilers/module.cr
compilers/module_access.cr
compilers/negated_expression.cr
compilers/next_call.cr
compilers/number_literal.cr
compilers/operation.cr
compilers/parenthesized_expression.cr
compilers/pipe.cr
compilers/property.cr
compilers/provider.cr
compilers/record.cr
compilers/record_constructor.cr
compilers/record_definition.cr
compilers/record_field.cr
compilers/record_update.cr
compilers/regexp_literal.cr
compilers/return_call.cr
compilers/route.cr
compilers/routes.cr
compilers/state.cr
compilers/statement.cr
compilers/store.cr
compilers/string_literal.cr
compilers/style.cr
compilers/suite.cr
compilers/test.cr
compilers/top_level.cr
compilers/tuple_literal.cr
compilers/unary_minus.cr
compilers/variable.cr
compilers/void.cr
Constant Summary
-
DEFAULT_OPTIONS =
Options.new(web_components: {} of String => String, css_prefix: nil, optimize: false, relative: false, build: false)
Constructors
Class Method Summary
-
.compile(artifacts : TypeChecker::Artifacts, options = DEFAULT_OPTIONS) : String
Compiles the application with the runtime and the rendering of the $Main component.
-
.compile_bare(artifacts : TypeChecker::Artifacts, options = DEFAULT_OPTIONS) : String
Compiles the application without the runtime.
- .compile_embed(artifacts : TypeChecker::Artifacts, options = DEFAULT_OPTIONS) : String
-
.compile_with_tests(artifacts : TypeChecker::Artifacts) : String
Compiles the application with the runtime and the tests
Instance Method Summary
- #_compile(items : Array(Ast::CssDefinition), block : Proc(String, String) | Nil)
- #_compile(node : Ast::Style, component : Ast::Component) : Nil
- #_compile(node : Ast::Access) : String
- #_compile(node : Ast::Argument) : String
- #_compile(node : Ast::ArrayAccess) : String
- #_compile(node : Ast::ArrayLiteral) : String
- #_compile(node : Ast::Block, for_function = false) : String
- #_compile(node : Ast::BoolLiteral) : String
- #_compile(node : Ast::Call) : String
- #_compile(node : Ast::CallExpression)
- #_compile(node : Ast::Case, block : Proc(String, String) | Nil = nil) : String
- #_compile(node : Ast::CaseBranch, block : Proc(String, String) | Nil = nil) : String
- #_compile(node : Ast::Component) : String
- #_compile(node : Ast::Decode) : String
- #_compile(node : Ast::Encode) : String
- #_compile(node : Ast::Enum) : String
- #_compile(node : Ast::EnumId) : String
- #_compile(node : Ast::For) : String
- #_compile(node : Ast::Function, contents = "") : String
- #_compile(node : Ast::Get) : String
- #_compile(node : Ast::HereDoc) : String
- #_compile(node : Ast::HtmlComponent) : String
- #_compile(node : Ast::HtmlElement) : String
- #_compile(node : Ast::HtmlExpression) : String
- #_compile(node : Ast::HtmlFragment) : String
- #_compile(node : Ast::If, block : Proc(String, String) | Nil = nil) : String
- #_compile(node : Ast::InlineFunction) : String
- #_compile(node : Ast::Interpolation) : String
- #_compile(node : Ast::Js) : String
- #_compile(node : Ast::LocaleKey) : String
- #_compile(node : Ast::MemberAccess) : String
- #_compile(node : Ast::Module) : String
- #_compile(node : Ast::ModuleAccess) : String
- #_compile(node : Ast::NegatedExpression) : String
- #_compile(node : Ast::NextCall) : String
- #_compile(node : Ast::NumberLiteral) : String
- #_compile(node : Ast::Operation) : String
- #_compile(node : Ast::ParenthesizedExpression) : String
- #_compile(node : Ast::Pipe) : String
- #_compile(node : Ast::Property) : String
- #_compile(node : Ast::Provider) : String
- #_compile(node : Ast::Record) : String
- #_compile(node : Ast::RecordDefinition) : String
- #_compile(node : Ast::RecordUpdate) : String
- #_compile(node : Ast::RegexpLiteral) : String
- #_compile(node : Ast::ReturnCall) : String
- #_compile(node : Ast::Route) : String
- #_compile(node : Ast::Routes) : String
- #_compile(node : Ast::State) : String
- #_compile(node : Ast::Store) : String
- #_compile(node : Ast::StringLiteral, quote : Bool = false) : String
- #_compile(node : Ast::Suite) : String
- #_compile(node : Ast::Test) : String
- #_compile(node : Ast::TupleLiteral) : String
- #_compile(node : Ast::UnaryMinus) : String
- #_compile(node : Ast::Variable) : String
- #_compile(node : Ast::Void) : String
- #_compile(node : Ast::Directives::Asset) : String
- #_compile(node : Ast::Directives::Documentation) : String
- #_compile(node : Ast::Directives::Format) : String
- #_compile(node : Ast::Directives::Highlight) : String
- #_compile(node : Ast::Directives::Inline) : String
- #_compile(node : Ast::Directives::Svg) : String
- #_compile(node : Ast::Node) : String
- #_compile(node : Ast::RecordConstructor) : String
- #_compile2(node : Ast::Statement) : Array(String)
- #_compile_operation_test(operation : Ast::Operation) : String | Nil
- #_compile_service_worker(node : Ast::Route) : String
- #_compile_service_worker(node : Ast::Routes) : String
- #_compile_service_worker(node : Ast::Node) : String
- #argument_order(*args, **options)
- #argument_order(*args, **options, &)
- #ast(*args, **options)
- #ast(*args, **options, &)
- #build : Bool
- #cache(*args, **options)
- #cache(*args, **options, &)
- #checked(*args, **options)
- #checked(*args, **options, &)
- #compile(node : Ast::Block, for_function = false) : String
- #compile(node : Ast::Case, block : Proc(String, String) | Nil = nil) : String
- #compile(nodes : Array(Ast::Style), component : Ast::Component) : Nil
- #compile(node : Ast::Style, component : Ast::Component) : Nil
- #compile(nodes : Array(Ast::Node), separator : String)
- #compile(node : Ast::Env) : String
- #compile(node : Ast::Function, contents = "") : String
- #compile(value : String)
- #compile(nodes : Array(Ast::Node))
- #compile(value : Array(Ast::Node | String), quote_string : Bool = false)
- #compile(node : Ast::If, block : Proc(String, String) | Nil = nil) : String
- #compile(node : Ast::StringLiteral, quote : Bool = false) : String
-
#compile(include_tests : Bool = false) : String
Compiles the application
- #compile(node : Ast::Node) : String
- #compile_component_functions(node : Ast::Component) : Array(String)
- #compile_component_store_data(node : Ast::Component) : Array(String)
- #compile_constants(nodes : Array(Ast::Constant)) : Hash(String, String)
- #compile_constructor(node : Ast::Store | Ast::Provider) : String
- #compile_html_component(node : Ast::HtmlComponent) : String
- #compile_service_worker(nodes : Array(Ast::Node))
- #compile_service_worker(node : Ast::Node) : String
- #compile_svg_directive(node : Ast::Directives::Svg) : String | Nil
- #compiled_locales
- #compiled_web_components
- #component_records(*args, **options)
- #component_records(*args, **options, &)
- #destructuring(node : Nil, variables : Array(String))
- #destructuring(node : Ast::Variable, variables : Array(String))
- #destructuring(node : Ast::Spread, variables : Array(String))
- #destructuring(node : Ast::ArrayDestructuring, variables : Array(String))
- #destructuring(node : Ast::TupleDestructuring, variables : Array(String))
- #destructuring(node : Ast::EnumDestructuring, variables : Array(String))
- #destructuring(node : Ast::Node, variables : Array(String))
- #err
- #escape_for_javascript(value : String)
- #js : Mint::Js
- #just
- #locales(*args, **options)
- #locales(*args, **options, &)
- #lookups(*args, **options)
- #lookups(*args, **options, &)
- #match(condition : Ast::Node, branches : Array(Tuple(Ast::Node | Nil, String)), await : Bool)
- #maybe
- #nothing
- #ok
- #parse_svg(contents)
- #record_field_lookup(*args, **options)
- #record_field_lookup(*args, **options, &)
- #relative : Bool
- #resolve(node : Ast::HtmlAttribute, is_element = true) : Hash(String, String)
- #resolve(node : Ast::RecordField) : Hash(String, String)
- #resolve_order(*args, **options)
- #resolve_order(*args, **options, &)
- #result
- #static_components : Hash(String, String)
- #static_components_pool : Mint::NamePool(String, Nil)
- #style_builder : Mint::StyleBuilder
- #types(*args, **options)
- #types(*args, **options, &)
- #variables(*args, **options)
- #variables(*args, **options, &)
-
#wrap_runtime(body, main = "")
Wraps the application with the runtime
Instance methods inherited from module Mint::Skippable
replace_skipped(result)
replace_skipped,
skip(&)
skip
Constructor Detail
def self.new(artifacts : TypeChecker::Artifacts, optimize : Bool = false, css_prefix = nil, relative : Bool = false, build : Bool = false, web_components : Hash(String, String) = {} of String => String)
#
Class Method Detail
Compiles the application with the runtime and the rendering of the $Main component.
Compiles the application without the runtime.
Compiles the application with the runtime and the tests