class Mint::Formatter
- Mint::Formatter
- Reference
- Object
Included Modules
Defined in:
formatter.crformatters/access.cr
formatters/argument.cr
formatters/array_destructuring.cr
formatters/array_literal.cr
formatters/block.cr
formatters/bool_literal.cr
formatters/bracket_access.cr
formatters/builtin.cr
formatters/call.cr
formatters/case.cr
formatters/case_branch.cr
formatters/comment.cr
formatters/component.cr
formatters/connect.cr
formatters/connect_variable.cr
formatters/constant.cr
formatters/css_definition.cr
formatters/css_font_face.cr
formatters/css_keyframes.cr
formatters/css_nested_at.cr
formatters/css_selector.cr
formatters/decode.cr
formatters/defer.cr
formatters/directives/asset.cr
formatters/directives/documentation.cr
formatters/directives/format.cr
formatters/directives/highlight.cr
formatters/directives/highlight_file.cr
formatters/directives/inline.cr
formatters/directives/svg.cr
formatters/encode.cr
formatters/env.cr
formatters/field.cr
formatters/field_access.cr
formatters/for.cr
formatters/function.cr
formatters/get.cr
formatters/here_document.cr
formatters/html.cr
formatters/html_attribute.cr
formatters/html_component.cr
formatters/html_element.cr
formatters/html_fragment.cr
formatters/html_style.cr
formatters/id.cr
formatters/if.cr
formatters/inline_function.cr
formatters/interpolation.cr
formatters/js.cr
formatters/list.cr
formatters/locale.cr
formatters/locale_key.cr
formatters/map.cr
formatters/map_field.cr
formatters/module.cr
formatters/negated_expression.cr
formatters/next_call.cr
formatters/number_literal.cr
formatters/operation.cr
formatters/parenthesized_expression.cr
formatters/pipe.cr
formatters/property.cr
formatters/provider.cr
formatters/record.cr
formatters/record_update.cr
formatters/regexp_literal.cr
formatters/return_call.cr
formatters/route.cr
formatters/routes.cr
formatters/spread.cr
formatters/state.cr
formatters/state_setter.cr
formatters/statement.cr
formatters/store.cr
formatters/string_literal.cr
formatters/style.cr
formatters/suite.cr
formatters/test.cr
formatters/top_level.cr
formatters/tuple_destructuring.cr
formatters/tuple_literal.cr
formatters/type.cr
formatters/type_definition.cr
formatters/type_definition_field.cr
formatters/type_destructuring.cr
formatters/type_variable.cr
formatters/type_variant.cr
formatters/unary_minus.cr
formatters/use.cr
formatters/variable.cr
Constructors
Class Method Summary
Instance Method Summary
- #config : Config
- #format(nodes : Array(Ast::Node | String), separator : String) : String
- #format(node : Ast::Access) : String
- #format(node : Ast::Argument) : String
- #format(node : Ast::ArrayDestructuring)
- #format(node : Ast::ArrayLiteral) : String
- #format(node : Ast::Block, format = BlockFormat::Block) : String
- #format(node : Ast::BoolLiteral) : String
- #format(node : Ast::BracketAccess) : String
- #format(node : Ast::Builtin) : String
- #format(node : Ast::Call) : String
- #format(node : Ast::Case) : String
- #format(node : Ast::CaseBranch) : String
- #format(node : Ast::Comment) : String
- #format(node : Ast::Component) : String
- #format(node : Ast::Connect) : String
- #format(node : Ast::ConnectVariable) : String
- #format(node : Ast::Constant) : String
- #format(node : Ast::CssDefinition) : String
- #format(node : Ast::CssFontFace) : String
- #format(node : Ast::CssKeyframes) : String
- #format(node : Ast::CssNestedAt) : String
- #format(node : Ast::CssSelector) : String
- #format(node : Ast::Decode)
- #format(node : Ast::Defer) : String
- #format(node : Ast::Encode)
- #format(node : Ast::Env)
- #format(node : Ast::Field) : String
- #format(node : Ast::FieldAccess) : String
- #format(node : Ast::For) : String
- #format(node : Ast::Function) : String
- #format(node : Ast::Get) : String
- #format(node : Ast::HereDocument) : String
- #format(node : Ast::HtmlAttribute) : String
- #format(node : Ast::HtmlComponent) : String
- #format(node : Ast::HtmlElement) : String
- #format(node : Ast::HtmlFragment) : String
- #format(node : Ast::HtmlStyle) : String
- #format(node : Ast::Id) : String
- #format(node : Ast::If) : String
- #format(node : Ast::InlineFunction) : String
- #format(node : Ast::Interpolation) : String
- #format(node : Ast::Js) : String
- #format(node : Ast::Locale) : String
- #format(node : Ast::LocaleKey) : String
- #format(node : Ast::Map) : String
- #format(node : Ast::MapField) : String
- #format(node : Ast::Module) : String
- #format(node : Ast::NegatedExpression) : String
- #format(node : Ast::NextCall) : String
- #format(node : Ast::NumberLiteral) : String
- #format(node : Ast::Operation) : String
- #format(node : Ast::ParenthesizedExpression) : String
- #format(node : Ast::Pipe) : String
- #format(node : Ast::Property) : String
- #format(node : Ast::Provider) : String
- #format(node : Ast::Record, multiline = false) : String
- #format(node : Ast::RecordUpdate) : String
- #format(node : Ast::RegexpLiteral) : String
- #format(node : Ast::ReturnCall) : String
- #format(node : Ast::Route) : String
- #format(node : Ast::Routes) : String
- #format(node : Ast::Spread) : String
- #format(node : Ast::State) : String
- #format(node : Ast::StateSetter) : String
- #format(node : Ast::Statement, newline = true) : String
- #format(node : Ast::Store) : String
- #format(node : Ast::StringLiteral) : String
- #format(node : Ast::Style) : String
- #format(node : Ast::Suite) : String
- #format(node : Ast::Test) : String
- #format(ast : Ast) : String
- #format(node : Ast::TupleDestructuring)
- #format(node : Ast::TupleLiteral) : String
- #format(node : Ast::Type) : String
- #format(node : Ast::TypeDefinition) : String
- #format(node : Ast::TypeDefinitionField) : String
- #format(node : Ast::TypeDestructuring)
- #format(node : Ast::TypeVariable) : String
- #format(node : Ast::TypeVariant)
- #format(node : Ast::UnaryMinus) : String
- #format(node : Ast::Use) : String
- #format(node : Ast::Variable) : String
- #format(node : Ast::Directives::Asset)
- #format(node : Ast::Directives::Documentation)
- #format(node : Ast::Directives::Format)
- #format(node : Ast::Directives::Highlight)
- #format(node : Ast::Directives::HighlightFile)
- #format(node : Ast::Directives::Inline)
- #format(node : Ast::Directives::Svg)
- #format(nodes : Array(Ast::Node | String)) : Array(String)
- #format(node : String) : String
- #format(node : Nil) : Nil
- #format(node : Ast::Node) : String
- #format(*, node : Ast::HtmlElement | Ast::HtmlComponent, prefix : String, tag : String) : String
- #format_arguments(arguments : Array(Ast::Argument))
- #format_parameters(parameters)
- #indent(string : String)
- #list(nodes : Array(Ast::Node), delimeter : String | Nil = nil) : String
-
#list(nodes : Array(Tuple(Ast::Node, String)), delimeter : String | Nil = nil) : String
Formats a list of nodes while preserving whitespace between them
- #skip_string(string)
- #source(node : Ast::Node) : String
Instance methods inherited from module Mint::Skippable
replace_skipped(result)
replace_skipped,
skip(&)
skip
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
def format(*, node : Ast::HtmlElement | Ast::HtmlComponent, prefix : String, tag : String) : String
#
Formats a list of nodes while preserving whitespace between them