diff --git a/.tool-versions b/.tool-versions index 3d9584e7a..4d9e79309 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,4 +1,4 @@ -crystal 1.14.0 +crystal 1.15.0 mint 0.20.0 nodejs 20.10.0 yarn 1.22.19 diff --git a/shard.lock b/shard.lock index a75595756..abb332056 100644 --- a/shard.lock +++ b/shard.lock @@ -6,7 +6,7 @@ shards: ameba: git: https://github.com/crystal-ameba/ameba.git - version: 1.6.1 + version: 1.6.4 ansi-escapes: git: https://github.com/gtramontina/ansi-escapes.cr.git diff --git a/shard.yml b/shard.yml index 0577da5ef..3e6da16e6 100644 --- a/shard.yml +++ b/shard.yml @@ -27,7 +27,7 @@ dependencies: development_dependencies: ameba: github: crystal-ameba/ameba - version: ~> 1.6.1 + version: ~> 1.6.4 targets: mint: diff --git a/src/ast.cr b/src/ast.cr index e97ddf98f..8d960e27b 100644 --- a/src/ast.cr +++ b/src/ast.cr @@ -52,7 +52,7 @@ module Mint *, column : Int64, path : String, - line : Int64 + line : Int64, ) : Array(Ast::Node) nodes_at_path(path).select!(&.contains?(line, column)) end diff --git a/src/ast/directives/file_based.cr b/src/ast/directives/file_based.cr index 0a92f6f4c..4f666714d 100644 --- a/src/ast/directives/file_based.cr +++ b/src/ast/directives/file_based.cr @@ -25,7 +25,7 @@ module Mint @from : Parser::Location, @to : Parser::Location, @file : Parser::File, - @path : String + @path : String, ) end diff --git a/src/bundler.cr b/src/bundler.cr index a3e6896d3..a14242da8 100644 --- a/src/bundler.cr +++ b/src/bundler.cr @@ -63,7 +63,7 @@ module Mint # Compile the CSS. files[path_for_asset("index.css")] = - ->do + -> do Logger.log "Generating index.css" do compiler.style_builder.compile end @@ -299,7 +299,7 @@ module Mint renderer.render(compiler.js.statements(items, line_count: 2)) + ";" end - files[path] = ->{ js } + files[path] = -> { js } {renderer, path, js} end @@ -313,8 +313,8 @@ module Mint source_map = SourceMapGenerator.new(renderer.mappings, js).generate - files[path] = ->{ "#{js}\n//# sourceMappingURL=#{File.basename(source_map_path)}" } - files[source_map_path] = ->{ source_map } + files[path] = -> { "#{js}\n//# sourceMappingURL=#{File.basename(source_map_path)}" } + files[source_map_path] = -> { source_map } end end end @@ -322,7 +322,7 @@ module Mint end def generate_index_html - files["/index.html"] = ->do + files["/index.html"] = -> do HtmlBuilder.build(optimize: config.optimize) do html do head do @@ -393,7 +393,7 @@ module Mint end def generate_manifest - files["/manifest.webmanifest"] = ->do + files["/manifest.webmanifest"] = -> do icons = if generate_icons? ICON_SIZES.map do |size| @@ -430,7 +430,7 @@ module Mint ICON_SIZES.each do |size| files[path_for_asset("icon-#{size}x#{size}.png")] = - ->{ IconGenerator.convert(json.application.icon, size) } + -> { IconGenerator.convert(json.application.icon, size) } end end @@ -443,7 +443,7 @@ module Mint path = path_for_asset(asset.filename(build: config.hash_assets)) - files[path] = ->{ asset.file_contents } + files[path] = -> { asset.file_contents } end if Dir.exists?(PUBLIC_DIR) @@ -453,23 +453,23 @@ module Mint parts = Path[path].parts.tap(&.shift) - files["/#{parts.join("/")}"] = ->{ File.read(path) } + files["/#{parts.join("/")}"] = -> { File.read(path) } end end files[path_for_asset("runtime.js")] = if runtime_path = config.runtime_path # TODO: Raise if runtime not found - ->{ File.read(runtime_path) } + -> { File.read(runtime_path) } elsif config.test - ->{ Assets.read("runtime_test.js") } + -> { Assets.read("runtime_test.js") } else - ->{ Assets.read("runtime.js") } + -> { Assets.read("runtime.js") } end if config.live_reload files[path_for_asset("live-reload.js")] = - ->{ Assets.read("live-reload.js") } + -> { Assets.read("live-reload.js") } end end diff --git a/src/commands/build.cr b/src/commands/build.cr index c184770b2..3a636d235 100644 --- a/src/commands/build.cr +++ b/src/commands/build.cr @@ -89,7 +89,7 @@ module Mint content.bytesize proc = - ->{ File.write_p(Path[DIST_DIR, chopped], content) } + -> { File.write_p(Path[DIST_DIR, chopped], content) } bundle_size += size diff --git a/src/compiler/js.cr b/src/compiler/js.cr index b5f246f01..8cb1b1948 100644 --- a/src/compiler/js.cr +++ b/src/compiler/js.cr @@ -119,7 +119,7 @@ module Mint # Renders an initializer. def new( name : Item | Compiled, - items : Array(Compiled) = [] of Compiled + items : Array(Compiled) = [] of Compiled, ) : Compiled ["new "] + call(name, items) end @@ -156,7 +156,7 @@ module Mint def tenary( condition : Compiled, truthy : Compiled, - falsy : Compiled + falsy : Compiled, ) : Compiled ["("] + condition + @@ -198,7 +198,7 @@ module Mint private def list( arguments : Array(Compiled), *, - multiline : Bool = false + multiline : Bool = false, ) : Compiled if multiline join(arguments, ",\n") diff --git a/src/compiler/renderer.cr b/src/compiler/renderer.cr index fdf565eb8..1f8e254f6 100644 --- a/src/compiler/renderer.cr +++ b/src/compiler/renderer.cr @@ -50,7 +50,7 @@ module Mint @asset_path, @bundles, @pool, - @base + @base, ) end diff --git a/src/compilers/case.cr b/src/compilers/case.cr index eb603ae6b..87c48dbbb 100644 --- a/src/compilers/case.cr +++ b/src/compilers/case.cr @@ -2,7 +2,7 @@ module Mint class Compiler def compile( node : Ast::Case, - block : Proc(String, String)? = nil + block : Proc(String, String)? = nil, ) : Compiled compile node do condition = diff --git a/src/compilers/case_branch.cr b/src/compilers/case_branch.cr index f6d236ba3..80bd847ca 100644 --- a/src/compilers/case_branch.cr +++ b/src/compilers/case_branch.cr @@ -2,7 +2,7 @@ module Mint class Compiler def compile( node : Ast::CaseBranch, - block : Proc(String, String)? = nil + block : Proc(String, String)? = nil, ) : Compiled compile node do expression = diff --git a/src/compilers/destructuring.cr b/src/compilers/destructuring.cr index 8d10c66bc..d8acbf0dc 100644 --- a/src/compilers/destructuring.cr +++ b/src/compilers/destructuring.cr @@ -32,7 +32,7 @@ module Mint def destructuring( node : Ast::TypeDestructuring, - variables : Array(Compiled) + variables : Array(Compiled), ) : Compiled case item = lookups[node][0] when Ast::TypeVariant @@ -51,7 +51,7 @@ module Mint def match( condition : Ast::Node, - branches : Array(Tuple(Ast::Node?, Compiled)) + branches : Array(Tuple(Ast::Node?, Compiled)), ) : Compiled items = branches.map do |(pattern, expression)| diff --git a/src/compilers/function.cr b/src/compilers/function.cr index 09509191a..8869f29af 100644 --- a/src/compilers/function.cr +++ b/src/compilers/function.cr @@ -16,7 +16,7 @@ module Mint node : Ast::Function, *, contents : Compiled | Nil = nil, args : Array(Compiled) | Nil = nil, - skip_const : Bool = false + skip_const : Bool = false, ) : Compiled items = [] of Compiled diff --git a/src/compilers/html_attribute.cr b/src/compilers/html_attribute.cr index 9208608cb..2f5b23da6 100644 --- a/src/compilers/html_attribute.cr +++ b/src/compilers/html_attribute.cr @@ -2,7 +2,7 @@ module Mint class Compiler def resolve( node : Ast::HtmlAttribute, *, - is_element = true + is_element = true, ) : Hash(Item, Compiled) value = compile node.value diff --git a/src/compilers/if.cr b/src/compilers/if.cr index 98b8ce6df..10f71f53b 100644 --- a/src/compilers/if.cr +++ b/src/compilers/if.cr @@ -2,7 +2,7 @@ module Mint class Compiler def compile( items : Array(Ast::CssDefinition), - block : Proc(String, String)? + block : Proc(String, String)?, ) : Compiled compiled = items.each_with_object({} of String => Compiled) do |definition, memo| @@ -24,7 +24,7 @@ module Mint def compile( node : Ast::If, - block : Proc(String, String)? = nil + block : Proc(String, String)? = nil, ) : Compiled compile node do truthy_item, falsy_item = diff --git a/src/compilers/string.cr b/src/compilers/string.cr index 013f449e9..95bafbc57 100644 --- a/src/compilers/string.cr +++ b/src/compilers/string.cr @@ -2,7 +2,7 @@ module Mint class Compiler def compile( value : Array(Ast::Node | String), *, - quote_string : Bool = false + quote_string : Bool = false, ) : Compiled if value.any?(Ast::Node) value.map do |part| diff --git a/src/documentation_generator.cr b/src/documentation_generator.cr index f9ba43089..bc3972e75 100644 --- a/src/documentation_generator.cr +++ b/src/documentation_generator.cr @@ -46,7 +46,7 @@ module Mint *, @value = nil, @type = nil, - @name + @name, ) end end @@ -90,7 +90,7 @@ module Mint @type = nil, @broken, @name, - @kind + @kind, ) end end @@ -127,7 +127,7 @@ module Mint @flags = nil, link = nil, @name, - @kind + @kind, ) @link = link || @name end @@ -325,7 +325,7 @@ module Mint mapping : String? = nil, type : Ast::Node? = nil, name : String, - kind : Kind + kind : Kind, ) formatted_value = @@formatter.format!(value) diff --git a/src/error_message.cr b/src/error_message.cr index 666c86ab5..b0d0b0421 100644 --- a/src/error_message.cr +++ b/src/error_message.cr @@ -4,10 +4,10 @@ module Mint files = {} of String => Proc(String) files["/live-reload.js"] = - ->{ Assets.read("live-reload.js") } if live_reload + -> { Assets.read("live-reload.js") } if live_reload files["/index.html"] = - ->do + -> do HtmlBuilder.build(optimize: true) do html do head do @@ -29,7 +29,7 @@ module Mint Assets.files.each do |file| next unless file.path.starts_with?("/error_message/") - files[file.path.lchop("/error_message")] = ->{ Assets.read(file.path) } + files[file.path.lchop("/error_message")] = -> { Assets.read(file.path) } end files diff --git a/src/errorable.cr b/src/errorable.cr index 4bdc755dd..fc36ef3f8 100644 --- a/src/errorable.cr +++ b/src/errorable.cr @@ -108,7 +108,7 @@ module Mint def expected( subject : TypeChecker::Checkable | String, - got : TypeChecker::Checkable + got : TypeChecker::Checkable, ) snippet "I was expecting:", subject snippet "Instead it is:", got diff --git a/src/exhaustiveness_checker.cr b/src/exhaustiveness_checker.cr index 04e0d0326..101854c52 100644 --- a/src/exhaustiveness_checker.cr +++ b/src/exhaustiveness_checker.cr @@ -257,7 +257,7 @@ module ExhaustivenessChecker def add_missing_patterns( node : Decision, terms : Array(Term), - missing : Set(String) + missing : Set(String), ) case node in Success @@ -513,7 +513,7 @@ module ExhaustivenessChecker def compile_constructor_cases( rows : Array(Row), branch_var : Variable, - cases : Array(Tuple(Constructor, Array(Variable), Array(Row))) + cases : Array(Tuple(Constructor, Array(Variable), Array(Row))), ) : Array(Case) rows.each do |row| # This row had the branching variable. @@ -584,7 +584,7 @@ module ExhaustivenessChecker # def compile_infinite_cases( rows : Array(Row), - branch_var : Variable + branch_var : Variable, ) : Tuple(Array(Case), Decision) raw_cases = [] of Tuple(Constructor, Array(Variable), Array(Row)) @@ -654,7 +654,7 @@ module ExhaustivenessChecker def compile_array_cases( rows : Array(Row), branch_var : Variable, - type : Checkable + type : Checkable, ) : Decision rest_var = new_variable(branch_var.type) diff --git a/src/formatter.cr b/src/formatter.cr index 45b5c9dcc..5b1d62ee2 100644 --- a/src/formatter.cr +++ b/src/formatter.cr @@ -148,7 +148,7 @@ module Mint def format_arguments( nodes : Array(Ast::Node), *, - empty_parenthesis = true + empty_parenthesis = true, ) : Nodes return empty_parenthesis ? ["()"] of Node : [] of Node if nodes.empty? diff --git a/src/formatters/html.cr b/src/formatters/html.cr index 704eadc60..0cc06ebf2 100644 --- a/src/formatters/html.cr +++ b/src/formatters/html.cr @@ -4,7 +4,7 @@ module Mint *, node : Ast::HtmlElement | Ast::HtmlComponent, prefix : Nodes, - tag : Nodes + tag : Nodes, ) : Nodes child_nodes = node.children + node.comments diff --git a/src/formatters/list.cr b/src/formatters/list.cr index 62438c6c4..f21fc5dfc 100644 --- a/src/formatters/list.cr +++ b/src/formatters/list.cr @@ -3,7 +3,7 @@ module Mint def list( nodes : Array(Ast::Node), separator : String? = nil, - comment : Nodes? = nil + comment : Nodes? = nil, ) : Nodes [ List.new( diff --git a/src/formatters/regexp_literal.cr b/src/formatters/regexp_literal.cr index 4ae95ed70..a8dcf5463 100644 --- a/src/formatters/regexp_literal.cr +++ b/src/formatters/regexp_literal.cr @@ -1,7 +1,7 @@ module Mint class Formatter def format(node : Ast::RegexpLiteral) : Nodes - format("/#{node.value}/#{node.flags.split.uniq.join}") + format("/#{node.value}/#{node.flags.split.uniq!.join}") end end end diff --git a/src/helpers.cr b/src/helpers.cr index 0a915d4b9..3ea82f28e 100644 --- a/src/helpers.cr +++ b/src/helpers.cr @@ -78,7 +78,7 @@ module Mint when Ast::Statement static_value(node.expression) when Ast::RegexpLiteral - "/#{node.value}/#{node.flags.split.uniq.join}" + "/#{node.value}/#{node.flags.split.uniq!.join}" when Ast::TupleLiteral, Ast::ArrayLiteral "[#{static_value(node.items, ',')}]" diff --git a/src/ls/completion.cr b/src/ls/completion.cr index 7b2a7a494..231270e76 100644 --- a/src/ls/completion.cr +++ b/src/ls/completion.cr @@ -18,7 +18,7 @@ module Mint *, @type_checker : TypeChecker | Nil, @snippet_support : Bool, - @workspace : Workspace + @workspace : Workspace, ) end diff --git a/src/ls/definitions.cr b/src/ls/definitions.cr index b8092802f..e0b0d5569 100644 --- a/src/ls/definitions.cr +++ b/src/ls/definitions.cr @@ -5,7 +5,7 @@ module Mint *, @params : LSP::TextDocumentPositionParams, @type_checker : TypeChecker, - @stack : Array(Ast::Node) + @stack : Array(Ast::Node), ) end diff --git a/src/ls/hover.cr b/src/ls/hover.cr index f85eb0fc3..3e1ad8ca3 100644 --- a/src/ls/hover.cr +++ b/src/ls/hover.cr @@ -8,7 +8,7 @@ module Mint def hover( node : Nil, workspace : Workspace, - type_checker : TypeChecker + type_checker : TypeChecker, ) : Array(String) ["This should not happen! Please create an issue about this!"] end @@ -17,7 +17,7 @@ module Mint def hover( node : Ast::Node, workspace : Workspace, - type_checker : TypeChecker + type_checker : TypeChecker, ) : Array(String) type = type_of(node, type_checker) diff --git a/src/ls/hover/access.cr b/src/ls/hover/access.cr index d8f3fb9c7..d2829a57a 100644 --- a/src/ls/hover/access.cr +++ b/src/ls/hover/access.cr @@ -4,7 +4,7 @@ module Mint def hover( node : Ast::Access, workspace : Workspace, - type_checker : TypeChecker + type_checker : TypeChecker, ) : Array(String) if item = type_checker.variables[node]? case item[1] diff --git a/src/ls/hover/argument.cr b/src/ls/hover/argument.cr index 8abc3c05f..e4ed0441b 100644 --- a/src/ls/hover/argument.cr +++ b/src/ls/hover/argument.cr @@ -4,7 +4,7 @@ module Mint def hover( node : Ast::Argument, workspace : Workspace, - type_checker : TypeChecker + type_checker : TypeChecker, ) : Array(String) type = workspace.format(node.type) diff --git a/src/ls/hover/component.cr b/src/ls/hover/component.cr index e8c62938f..a9a98c9dd 100644 --- a/src/ls/hover/component.cr +++ b/src/ls/hover/component.cr @@ -4,7 +4,7 @@ module Mint def hover( node : Ast::Component, workspace : Workspace, - type_checker : TypeChecker + type_checker : TypeChecker, ) : Array(String) properties = node diff --git a/src/ls/hover/css_definition.cr b/src/ls/hover/css_definition.cr index 58adeebeb..08c3d5067 100644 --- a/src/ls/hover/css_definition.cr +++ b/src/ls/hover/css_definition.cr @@ -4,7 +4,7 @@ module Mint def hover( node : Ast::CssDefinition, workspace : Workspace, - type_checker : TypeChecker + type_checker : TypeChecker, ) : Array(String) path = URI.encode_path(node.name) diff --git a/src/ls/hover/function.cr b/src/ls/hover/function.cr index f37523bca..f09db902e 100644 --- a/src/ls/hover/function.cr +++ b/src/ls/hover/function.cr @@ -4,7 +4,7 @@ module Mint def hover( node : Ast::Function, workspace : Workspace, - type_checker : TypeChecker + type_checker : TypeChecker, ) : Array(String) ast = type_checker.artifacts.ast diff --git a/src/ls/hover/get.cr b/src/ls/hover/get.cr index 57e7eaf58..12e1087a3 100644 --- a/src/ls/hover/get.cr +++ b/src/ls/hover/get.cr @@ -4,7 +4,7 @@ module Mint def hover( node : Ast::Get, workspace : Workspace, - type_checker : TypeChecker + type_checker : TypeChecker, ) : Array(String) ast = type_checker.artifacts.ast diff --git a/src/ls/hover/html_attribute.cr b/src/ls/hover/html_attribute.cr index 854f7da6d..540c198a4 100644 --- a/src/ls/hover/html_attribute.cr +++ b/src/ls/hover/html_attribute.cr @@ -4,7 +4,7 @@ module Mint def hover( node : Ast::HtmlAttribute, workspace : Workspace, - type_checker : TypeChecker + type_checker : TypeChecker, ) : Array(String) type = type_of(node, type_checker) diff --git a/src/ls/hover/html_component.cr b/src/ls/hover/html_component.cr index 8b0e85087..b60228f8e 100644 --- a/src/ls/hover/html_component.cr +++ b/src/ls/hover/html_component.cr @@ -4,7 +4,7 @@ module Mint def hover( node : Ast::HtmlComponent, workspace : Workspace, - type_checker : TypeChecker + type_checker : TypeChecker, ) : Array(String) component = type_checker.lookups[node]?.try(&.first?) diff --git a/src/ls/hover/html_element.cr b/src/ls/hover/html_element.cr index 966258ef8..0c636068b 100644 --- a/src/ls/hover/html_element.cr +++ b/src/ls/hover/html_element.cr @@ -4,7 +4,7 @@ module Mint def hover( node : Ast::HtmlElement, workspace : Workspace, - type_checker : TypeChecker + type_checker : TypeChecker, ) : Array(String) path = URI.encode_path(node.tag.value) diff --git a/src/ls/hover/property.cr b/src/ls/hover/property.cr index d62d9d39a..c2ef09f1d 100644 --- a/src/ls/hover/property.cr +++ b/src/ls/hover/property.cr @@ -4,7 +4,7 @@ module Mint def hover( node : Ast::Property, workspace : Workspace, - type_checker : TypeChecker + type_checker : TypeChecker, ) : Array(String) default = node.default.try do |item| diff --git a/src/ls/hover/state.cr b/src/ls/hover/state.cr index 6a4d25b1c..d2c36c938 100644 --- a/src/ls/hover/state.cr +++ b/src/ls/hover/state.cr @@ -4,7 +4,7 @@ module Mint def hover( node : Ast::State, workspace : Workspace, - type_checker : TypeChecker + type_checker : TypeChecker, ) : Array(String) default = " = #{workspace.format(node.default)}" diff --git a/src/ls/hover/statement.cr b/src/ls/hover/statement.cr index 9f2fda650..158869621 100644 --- a/src/ls/hover/statement.cr +++ b/src/ls/hover/statement.cr @@ -4,7 +4,7 @@ module Mint def hover( node : Ast::Statement, workspace : Workspace, - type_checker : TypeChecker + type_checker : TypeChecker, ) : Array(String) type = type_of(node, type_checker) diff --git a/src/ls/hover/string_literal.cr b/src/ls/hover/string_literal.cr index 6e62dc698..cf6459532 100644 --- a/src/ls/hover/string_literal.cr +++ b/src/ls/hover/string_literal.cr @@ -4,7 +4,7 @@ module Mint def hover( node : Ast::StringLiteral, workspace : Workspace, - type_checker : TypeChecker + type_checker : TypeChecker, ) : Array(String) ["String"] end diff --git a/src/ls/hover/type.cr b/src/ls/hover/type.cr index d29f849b5..f568a2ba7 100644 --- a/src/ls/hover/type.cr +++ b/src/ls/hover/type.cr @@ -4,7 +4,7 @@ module Mint def hover( node : Ast::Type, workspace : Workspace, - type_checker : TypeChecker + type_checker : TypeChecker, ) : Array(String) definition = type_checker diff --git a/src/ls/hover/type_definition.cr b/src/ls/hover/type_definition.cr index 26ea35088..0e55831a4 100644 --- a/src/ls/hover/type_definition.cr +++ b/src/ls/hover/type_definition.cr @@ -4,7 +4,7 @@ module Mint def hover( node : Ast::TypeDefinition, workspace : Workspace, - type_checker : TypeChecker + type_checker : TypeChecker, ) : Array(String) parameters = "" # workspace.formatter.format_parameters(node.parameters) diff --git a/src/ls/hover/type_destructuring.cr b/src/ls/hover/type_destructuring.cr index 3f4374789..255e87373 100644 --- a/src/ls/hover/type_destructuring.cr +++ b/src/ls/hover/type_destructuring.cr @@ -4,7 +4,7 @@ module Mint def hover( node : Ast::TypeDestructuring, workspace : Workspace, - type_checker : TypeChecker + type_checker : TypeChecker, ) : Array(String) item = type_checker.lookups[node].try(&.first?) diff --git a/src/ls/hover/type_variant.cr b/src/ls/hover/type_variant.cr index 4cb648a04..70cecd99d 100644 --- a/src/ls/hover/type_variant.cr +++ b/src/ls/hover/type_variant.cr @@ -4,7 +4,7 @@ module Mint def hover( node : Ast::TypeVariant, workspace : Workspace, - type_checker : TypeChecker + type_checker : TypeChecker, ) : Array(String) item = type_checker diff --git a/src/lsp/protocol/code_action.cr b/src/lsp/protocol/code_action.cr index fcb2e6745..e8ef6cc20 100644 --- a/src/lsp/protocol/code_action.cr +++ b/src/lsp/protocol/code_action.cr @@ -78,7 +78,7 @@ module LSP @is_preferred = false, @disabled = nil, @command = nil, - @data = nil + @data = nil, ) end end diff --git a/src/lsp/protocol/server_capabilities.cr b/src/lsp/protocol/server_capabilities.cr index d3d1e18ca..cb6e14007 100644 --- a/src/lsp/protocol/server_capabilities.cr +++ b/src/lsp/protocol/server_capabilities.cr @@ -127,7 +127,7 @@ module LSP @rename_provider, @color_provider, @hover_provider, - @workspace + @workspace, ) end end diff --git a/src/lsp/protocol/text_document_sync_options.cr b/src/lsp/protocol/text_document_sync_options.cr index b6d16cbd3..3fdda14ed 100644 --- a/src/lsp/protocol/text_document_sync_options.cr +++ b/src/lsp/protocol/text_document_sync_options.cr @@ -27,7 +27,7 @@ module LSP @open_close, @will_save, @change, - @save + @save, ) end end diff --git a/src/mint_json.cr b/src/mint_json.cr index 1a7056c4f..721b93047 100644 --- a/src/mint_json.cr +++ b/src/mint_json.cr @@ -21,7 +21,7 @@ module Mint @meta, @name, @head, - @icon + @icon, ) end end @@ -42,7 +42,7 @@ module Mint @application, @formatter, @name, - @path + @path, ) end diff --git a/src/mint_json/parser.cr b/src/mint_json/parser.cr index 1a3edee2a..c8c1fc038 100644 --- a/src/mint_json/parser.cr +++ b/src/mint_json/parser.cr @@ -62,7 +62,7 @@ module Mint column_number : Int32, line_number : Int32, contents : String, - path : String + path : String, ) position = if line_number - 1 == 0 diff --git a/src/parsers/case.cr b/src/parsers/case.cr index fb79f096d..e980a34f4 100644 --- a/src/parsers/case.cr +++ b/src/parsers/case.cr @@ -21,11 +21,11 @@ module Mint whitespace body = brackets( - ->{ error :case_expected_opening_bracket do + -> { error :case_expected_opening_bracket do expected "the opening bracket of a case", word snippet self end }, - ->{ error :case_expected_closing_bracket do + -> { error :case_expected_closing_bracket do expected "the closing bracket of a case", word snippet self end }, diff --git a/src/parsers/component.cr b/src/parsers/component.cr index 2e394ef48..2ae17d5b6 100644 --- a/src/parsers/component.cr +++ b/src/parsers/component.cr @@ -26,11 +26,11 @@ module Mint whitespace body = brackets( - ->{ error :component_expected_opening_bracket do + -> { error :component_expected_opening_bracket do expected "the opening bracket of the component", word snippet self end }, - ->{ error :component_expected_closing_bracket do + -> { error :component_expected_closing_bracket do expected "the closing bracket of the component", word snippet self end }, diff --git a/src/parsers/connect.cr b/src/parsers/connect.cr index 97473d21d..7473e32f0 100644 --- a/src/parsers/connect.cr +++ b/src/parsers/connect.cr @@ -19,11 +19,11 @@ module Mint keys = brackets( - ->{ error :connect_expected_opening_bracket do + -> { error :connect_expected_opening_bracket do expected "the opening bracket of a connect", word snippet self end }, - ->{ error :connect_expected_closing_bracket do + -> { error :connect_expected_closing_bracket do expected "the closing bracket of a connect", word snippet self end }, diff --git a/src/parsers/css_font_face.cr b/src/parsers/css_font_face.cr index 22b6df7fb..42d757859 100644 --- a/src/parsers/css_font_face.cr +++ b/src/parsers/css_font_face.cr @@ -7,11 +7,11 @@ module Mint definitions = brackets( - ->{ error :css_font_face_expected_opening_bracket do + -> { error :css_font_face_expected_opening_bracket do expected "the opening bracket of a CSS font-face rule", word snippet self end }, - ->{ error :css_font_face_expected_closing_bracket do + -> { error :css_font_face_expected_closing_bracket do expected "the closing bracket of a CSS font-face rule", word snippet self end }, diff --git a/src/parsers/css_keyframes.cr b/src/parsers/css_keyframes.cr index c883500a3..6e7264719 100644 --- a/src/parsers/css_keyframes.cr +++ b/src/parsers/css_keyframes.cr @@ -14,11 +14,11 @@ module Mint end unless name selectors = brackets( - ->{ error :css_keyframes_expected_opening_bracket do + -> { error :css_keyframes_expected_opening_bracket do expected "the opening bracket of a CSS keyframes rule", word snippet self end }, - ->{ error :css_keyframes_expected_closing_bracket do + -> { error :css_keyframes_expected_closing_bracket do expected "the closing bracket of a CSS keyframes rule", word snippet self end }, diff --git a/src/parsers/css_nested_at.cr b/src/parsers/css_nested_at.cr index 7e38c9c84..a39049ec0 100644 --- a/src/parsers/css_nested_at.cr +++ b/src/parsers/css_nested_at.cr @@ -15,11 +15,11 @@ module Mint body = brackets( - ->{ error :css_nested_at_expected_opening_bracket do + -> { error :css_nested_at_expected_opening_bracket do expected "the opening bracket of a CSS at rule", word snippet self end }, - ->{ error :css_nested_at_expected_closing_bracket do + -> { error :css_nested_at_expected_closing_bracket do expected "the closing bracket of a CSS at rule", word snippet self end }, diff --git a/src/parsers/css_selector.cr b/src/parsers/css_selector.cr index 53476e730..d0af2bc9d 100644 --- a/src/parsers/css_selector.cr +++ b/src/parsers/css_selector.cr @@ -14,11 +14,11 @@ module Mint body = brackets( - ->{ error :css_selector_expected_opening_bracket do + -> { error :css_selector_expected_opening_bracket do expected "the opening bracket of a CSS selector", word snippet self end }, - ->{ error :css_selector_expected_closing_bracket do + -> { error :css_selector_expected_closing_bracket do expected "the opening closing of a CSS selector", word snippet self end }, diff --git a/src/parsers/directives/format.cr b/src/parsers/directives/format.cr index 76769bf7b..d3bfa3490 100644 --- a/src/parsers/directives/format.cr +++ b/src/parsers/directives/format.cr @@ -7,15 +7,15 @@ module Mint content = block( - ->{ error :format_directive_expected_opening_bracket do + -> { error :format_directive_expected_opening_bracket do expected "the opening bracket of a format directive", word snippet self end }, - ->{ error :format_directive_expected_closing_bracket do + -> { error :format_directive_expected_closing_bracket do expected "the closing bracket of a format directive", word snippet self end }, - ->{ error :format_directive_expected_body do + -> { error :format_directive_expected_body do expected "the body of a format directive", word snippet self end }) diff --git a/src/parsers/directives/highlight.cr b/src/parsers/directives/highlight.cr index a789f5238..269eb3085 100644 --- a/src/parsers/directives/highlight.cr +++ b/src/parsers/directives/highlight.cr @@ -7,15 +7,15 @@ module Mint content = block( - ->{ error :highlight_directive_expected_opening_bracket do + -> { error :highlight_directive_expected_opening_bracket do expected "the opening bracket of a highlight directive", word snippet self end }, - ->{ error :highlight_directive_expected_closing_bracket do + -> { error :highlight_directive_expected_closing_bracket do expected "the closing bracket of a highlight directive", word snippet self end }, - ->{ error :highlight_directive_expected_body do + -> { error :highlight_directive_expected_body do expected "the body of a highlight directive", word snippet self end }) diff --git a/src/parsers/for.cr b/src/parsers/for.cr index 53f0341cb..2143a78ed 100644 --- a/src/parsers/for.cr +++ b/src/parsers/for.cr @@ -37,15 +37,15 @@ module Mint body = block( - ->{ error :for_expected_opening_bracket do + -> { error :for_expected_opening_bracket do expected "the opening bracket of a for expression", word snippet self end }, - ->{ error :for_expected_closing_bracket do + -> { error :for_expected_closing_bracket do expected "the closing bracket of a for expression", word snippet self end }, - ->{ error :for_expected_body do + -> { error :for_expected_body do expected "the body of a for expression", word snippet self end }) @@ -58,15 +58,15 @@ module Mint whitespace block( - ->{ error :for_condition_expected_opening_bracket do + -> { error :for_condition_expected_opening_bracket do expected "the opening bracket of a for condition", word snippet self end }, - ->{ error :for_condition_expected_closing_bracket do + -> { error :for_condition_expected_closing_bracket do expected "the closing bracket of a for condition", word snippet self end }, - ->{ + -> { error :for_condition_expected_body do expected "the body of a for condition", word snippet self diff --git a/src/parsers/function.cr b/src/parsers/function.cr index bc4763025..ea51dccc3 100644 --- a/src/parsers/function.cr +++ b/src/parsers/function.cr @@ -43,15 +43,15 @@ module Mint body = block( - ->{ error :function_expected_opening_bracket do + -> { error :function_expected_opening_bracket do expected "the opening bracket of a function", word snippet self end }, - ->{ error :function_expected_closing_bracket do + -> { error :function_expected_closing_bracket do expected "the closing bracket of a function", word snippet self end }, - ->{ error :function_expected_expression do + -> { error :function_expected_expression do expected "the body of a function", word snippet self end }) diff --git a/src/parsers/get.cr b/src/parsers/get.cr index 1a39fe1c5..455527977 100644 --- a/src/parsers/get.cr +++ b/src/parsers/get.cr @@ -27,15 +27,15 @@ module Mint end body = - block(->{ error :get_expected_opening_bracket do + block(-> { error :get_expected_opening_bracket do expected "the opening bracket of a get", word snippet self end }, - ->{ error :get_expected_closing_bracket do + -> { error :get_expected_closing_bracket do expected "the closing bracket of a get", word snippet self end }, - ->{ error :get_expected_expression do + -> { error :get_expected_expression do expected "the body of a get", word snippet self end }) diff --git a/src/parsers/html_attribute.cr b/src/parsers/html_attribute.cr index 649326b56..2a6d1d161 100644 --- a/src/parsers/html_attribute.cr +++ b/src/parsers/html_attribute.cr @@ -18,15 +18,15 @@ module Mint string_literal || array_literal || block( - ->{ error :html_attribute_expected_opening_bracket do + -> { error :html_attribute_expected_opening_bracket do expected "the opening bracket of an HTML attribute", word snippet self end }, - ->{ error :html_attribute_expected_closing_bracket do + -> { error :html_attribute_expected_closing_bracket do expected "the closing bracket of an HTML attribute", word snippet self end }, - ->{ error :html_attribute_expected_expression do + -> { error :html_attribute_expected_expression do expected "the expression of an HTML attribute", word snippet self end }) diff --git a/src/parsers/html_body.cr b/src/parsers/html_body.cr index c6e2d81fa..c2518fbec 100644 --- a/src/parsers/html_body.cr +++ b/src/parsers/html_body.cr @@ -5,7 +5,7 @@ module Mint expected_closing_bracket : Proc(Nil), expected_closing_tag : Proc(Nil), tag : Ast::Variable | Ast::Id, - with_dashes : Bool + with_dashes : Bool, ) parse(track: false) do attributes = many { html_attribute(with_dashes) } diff --git a/src/parsers/html_component.cr b/src/parsers/html_component.cr index ec5efe115..e915b87df 100644 --- a/src/parsers/html_component.cr +++ b/src/parsers/html_component.cr @@ -23,13 +23,13 @@ module Mint html_body( with_dashes: false, tag: component, - expected_closing_bracket: ->{ + expected_closing_bracket: -> { error :html_component_expected_closing_bracket do expected "the closing bracket of a HTML component", word snippet self end }, - expected_closing_tag: ->{ + expected_closing_tag: -> { error :html_component_expected_closing_tag do expected "the closing tag of a HTML component", word snippet self diff --git a/src/parsers/html_element.cr b/src/parsers/html_element.cr index 1a3e22072..52690a477 100644 --- a/src/parsers/html_element.cr +++ b/src/parsers/html_element.cr @@ -38,13 +38,13 @@ module Mint html_body( with_dashes: true, tag: tag, - expected_closing_bracket: ->{ + expected_closing_bracket: -> { error :html_element_expected_closing_bracket do expected "the closing bracket of an HTML element", word snippet self end }, - expected_closing_tag: ->{ + expected_closing_tag: -> { error :html_element_expected_closing_tag do expected "the closing tag of an HTML element", word snippet self diff --git a/src/parsers/if.cr b/src/parsers/if.cr index 8883ecd4e..209425c19 100644 --- a/src/parsers/if.cr +++ b/src/parsers/if.cr @@ -13,16 +13,16 @@ module Mint truthy = block( - ->{ error :if_expected_truthy_opening_bracket do + -> { error :if_expected_truthy_opening_bracket do expected "the opening bracket of the truthy branch", word snippet self end }, - ->{ error :if_expected_truthy_closing_bracket do + -> { error :if_expected_truthy_closing_bracket do expected "the closing bracket of the truthy branch", word snippet self end }, - ->{ error :if_expected_truthy_expression do + -> { error :if_expected_truthy_expression do expected "an expression for the truthy branch", word snippet self end }) { for_css ? css_definition : comment || statement } @@ -38,15 +38,15 @@ module Mint unless falsy = if_expression(for_css: for_css) falsy = block( - ->{ error :if_expected_else_opening_bracket do + -> { error :if_expected_else_opening_bracket do expected "the opening bracket of the else branch", word snippet self end }, - ->{ error :if_expected_else_closing_bracket do + -> { error :if_expected_else_closing_bracket do expected "the closing bracket of the else branch", word snippet self end }, - ->{ error :if_expected_else_expression do + -> { error :if_expected_else_expression do expected "an expression for the else branch", word snippet self end }) { for_css ? css_definition : comment || statement } diff --git a/src/parsers/inline_function.cr b/src/parsers/inline_function.cr index f7149c2e8..6fac1d036 100644 --- a/src/parsers/inline_function.cr +++ b/src/parsers/inline_function.cr @@ -30,15 +30,15 @@ module Mint body = block( - ->{ error :inline_function_expected_opening_bracket do + -> { error :inline_function_expected_opening_bracket do expected "the opening bracket of an inline function", word snippet self end }, - ->{ error :inline_function_expected_closing_bracket do + -> { error :inline_function_expected_closing_bracket do expected "the closing bracket of an inline function", word snippet self end }, - ->{ error :inline_function_expected_body do + -> { error :inline_function_expected_body do expected "the body of an inline function", word snippet self end }) diff --git a/src/parsers/locale.cr b/src/parsers/locale.cr index afec5b9a6..afa86918a 100644 --- a/src/parsers/locale.cr +++ b/src/parsers/locale.cr @@ -16,13 +16,13 @@ module Mint fields = brackets( - ->{ + -> { error :locale_expected_opening_bracket do expected "the opening bracket of a locale", word snippet self end }, - ->{ + -> { error :locale_expected_closing_bracket do expected "the opening bracket of a locale", word snippet self diff --git a/src/parsers/module.cr b/src/parsers/module.cr index 8eda25f8c..bad9301b7 100644 --- a/src/parsers/module.cr +++ b/src/parsers/module.cr @@ -21,11 +21,11 @@ module Mint body = brackets( - ->{ error :module_expected_opening_bracket do + -> { error :module_expected_opening_bracket do expected "the opening bracket of a module", word snippet self end }, - ->{ error :module_expected_closing_bracket do + -> { error :module_expected_closing_bracket do expected "the closing bracket of a module", word snippet self end }, diff --git a/src/parsers/operation.cr b/src/parsers/operation.cr index 98fdd67c9..567de1aae 100644 --- a/src/parsers/operation.cr +++ b/src/parsers/operation.cr @@ -8,7 +8,7 @@ module Mint def operation( left : Ast::Node, operator : String, - comment : Ast::Comment? + comment : Ast::Comment?, ) : Ast::Operation? parse do next error :operation_expected_expression do diff --git a/src/parsers/provider.cr b/src/parsers/provider.cr index d2f30681d..3d3de4acb 100644 --- a/src/parsers/provider.cr +++ b/src/parsers/provider.cr @@ -27,11 +27,11 @@ module Mint whitespace body = brackets( - ->{ error :provider_expected_opening_bracket do + -> { error :provider_expected_opening_bracket do expected "the opening bracket of a provider", word snippet self end }, - ->{ error :provider_expected_closing_bracket do + -> { error :provider_expected_closing_bracket do expected "the closing bracket of a provider", word snippet self end }, diff --git a/src/parsers/route.cr b/src/parsers/route.cr index 3876d140f..54d285969 100644 --- a/src/parsers/route.cr +++ b/src/parsers/route.cr @@ -35,15 +35,15 @@ module Mint body = block( - ->{ error :route_expected_opening_bracket do + -> { error :route_expected_opening_bracket do expected "the opening bracket of a route", word snippet self end }, - ->{ error :route_expected_closing_bracket do + -> { error :route_expected_closing_bracket do expected "the closing bracket of a route", word snippet self end }, - ->{ error :route_expected_body do + -> { error :route_expected_body do expected "the body of a route", word snippet self end }) diff --git a/src/parsers/routes.cr b/src/parsers/routes.cr index d32ad92bf..c9b9bdddf 100644 --- a/src/parsers/routes.cr +++ b/src/parsers/routes.cr @@ -7,11 +7,11 @@ module Mint body = brackets( - ->{ error :routes_expected_opening_bracket do + -> { error :routes_expected_opening_bracket do expected "the opening bracket of a routes block", word snippet self end }, - ->{ error :routes_expected_closing_bracket do + -> { error :routes_expected_closing_bracket do expected "the closing bracket of a routes block", word snippet self end }, diff --git a/src/parsers/store.cr b/src/parsers/store.cr index 1ffbb2696..c8b308a06 100644 --- a/src/parsers/store.cr +++ b/src/parsers/store.cr @@ -16,11 +16,11 @@ module Mint body = brackets( - ->{ error :store_expected_opening_bracket do + -> { error :store_expected_opening_bracket do expected "the opening bracket of a store", word snippet self end }, - ->{ error :store_expected_closing_bracket do + -> { error :store_expected_closing_bracket do expected "the closing bracket of a store", word snippet self end }, diff --git a/src/parsers/style.cr b/src/parsers/style.cr index fad5694dc..b86d15f20 100644 --- a/src/parsers/style.cr +++ b/src/parsers/style.cr @@ -27,11 +27,11 @@ module Mint body = brackets( - ->{ error :style_expected_opening_bracket do + -> { error :style_expected_opening_bracket do expected "the opening bracket of a style", word snippet self end }, - ->{ error :style_expected_closing_bracket do + -> { error :style_expected_closing_bracket do expected "the closing bracket of a style", word snippet self end }, diff --git a/src/parsers/suite.cr b/src/parsers/suite.cr index 5c70cea11..ae8b491eb 100644 --- a/src/parsers/suite.cr +++ b/src/parsers/suite.cr @@ -13,11 +13,11 @@ module Mint body = brackets( - ->{ error :suite_expected_opening_bracket do + -> { error :suite_expected_opening_bracket do expected "the opening bracket of a suite", word snippet self end }, - ->{ error :suite_expected_closing_bracket do + -> { error :suite_expected_closing_bracket do expected "the closing bracket of a suite", word snippet self end }, diff --git a/src/parsers/test.cr b/src/parsers/test.cr index 921c02d64..c7a4100aa 100644 --- a/src/parsers/test.cr +++ b/src/parsers/test.cr @@ -13,15 +13,15 @@ module Mint expression = block( - ->{ error :test_expected_opening_bracket do + -> { error :test_expected_opening_bracket do expected "the opening bracket of a test", word snippet self end }, - ->{ error :test_expected_closing_bracket do + -> { error :test_expected_closing_bracket do expected "the closing bracket of a test", word snippet self end }, - ->{ error :test_expected_body do + -> { error :test_expected_body do expected "the body of a test", word snippet self end }) diff --git a/src/parsers/use.cr b/src/parsers/use.cr index 391092531..58279eae1 100644 --- a/src/parsers/use.cr +++ b/src/parsers/use.cr @@ -23,11 +23,11 @@ module Mint whitespace brackets( - ->{ error :use_expected_condition_opening_bracket do + -> { error :use_expected_condition_opening_bracket do expected "the opening bracket of a use condition", word snippet self end }, - ->{ error :use_expected_condition_closing_bracket do + -> { error :use_expected_condition_closing_bracket do expected "the closing bracket of a use condition", word snippet self end }, diff --git a/src/static_documentation_generator.cr b/src/static_documentation_generator.cr index 1a87a2be6..24237d7fa 100644 --- a/src/static_documentation_generator.cr +++ b/src/static_documentation_generator.cr @@ -21,10 +21,10 @@ module Mint .to_h .tap do |files| files["/live-reload.js"] = - ->{ Assets.read("live-reload.js") } if live_reload + -> { Assets.read("live-reload.js") } if live_reload files["/index.html"] = - ->do + -> do layout "API Documentation", entities, live_reload do article do h1 do @@ -36,7 +36,7 @@ module Mint Assets.files.each do |file| next unless file.path.starts_with?("/docs/") - files[file.path.lchop("/docs")] = ->{ Assets.read(file.path) } + files[file.path.lchop("/docs")] = -> { Assets.read(file.path) } end end end @@ -44,11 +44,11 @@ module Mint def generate( entity : TopLevelEntity, entities : Array(TopLevelEntity), - live_reload : Bool + live_reload : Bool, ) : {String, Proc(String)} { "/#{href(entity)}", - ->do + -> do layout entity.name, entities, live_reload do |builder| article do h1 do @@ -114,14 +114,14 @@ module Mint def entity_signature( entity : Entity, - builder : HtmlBuilder + builder : HtmlBuilder, ) - head = ->do + head = -> do builder.span class: "keyword" { text "#{kind(entity.kind)} " } builder.a href: "##{entity.name}" { text entity.name } end - type = ->do + type = -> do if value = entity.type builder.span { text " : " } builder.raw value @@ -129,7 +129,7 @@ module Mint end arguments = entity.arguments.try do |items| - ->do + -> do items.each_with_index do |argument, index| builder.div class: "argument" do span { text argument.name } diff --git a/src/type_checker.cr b/src/type_checker.cr index b9a882266..30d363d72 100644 --- a/src/type_checker.cr +++ b/src/type_checker.cr @@ -319,7 +319,7 @@ module Mint other : Ast::Node, node : Ast::Node, what : String, - name : String + name : String, ) error! :global_name_conflict do block do diff --git a/src/type_checker/record.cr b/src/type_checker/record.cr index fe60c78cc..01bfb6a8b 100644 --- a/src/type_checker/record.cr +++ b/src/type_checker/record.cr @@ -10,7 +10,7 @@ module Mint @name : String, @fields = {} of String => Checkable, @mappings = {} of String => String?, - @label = nil + @label = nil, ) end diff --git a/src/type_checkers/destructuring.cr b/src/type_checkers/destructuring.cr index 8d13c206a..48c95d2f5 100644 --- a/src/type_checkers/destructuring.cr +++ b/src/type_checkers/destructuring.cr @@ -23,7 +23,7 @@ module Mint def destructure( node : Nil, condition : Checkable, - variables : Array(VariableScope) = [] of VariableScope + variables : Array(VariableScope) = [] of VariableScope, ) variables end @@ -31,7 +31,7 @@ module Mint def destructure( node : Ast::Discard, condition : Checkable, - variables : Array(VariableScope) = [] of VariableScope + variables : Array(VariableScope) = [] of VariableScope, ) variables end @@ -39,7 +39,7 @@ module Mint def destructure( node : Ast::Node, condition : Checkable, - variables : Array(VariableScope) = [] of VariableScope + variables : Array(VariableScope) = [] of VariableScope, ) type = resolve(node) @@ -56,7 +56,7 @@ module Mint def destructure( node : Ast::Variable, condition : Checkable, - variables : Array(VariableScope) = [] of VariableScope + variables : Array(VariableScope) = [] of VariableScope, ) cache[node] = condition variables.tap(&.push({node.value, condition, node})) @@ -65,7 +65,7 @@ module Mint def destructure( node : Ast::ArrayDestructuring, condition : Checkable, - variables : Array(VariableScope) = [] of VariableScope + variables : Array(VariableScope) = [] of VariableScope, ) destructuring_type_mismatch( expected: ARRAY, @@ -118,7 +118,7 @@ module Mint def destructure( node : Ast::TupleDestructuring, condition : Checkable, - variables : Array(VariableScope) = [] of VariableScope + variables : Array(VariableScope) = [] of VariableScope, ) destructuring_type_mismatch( expected: Type.new("Tuple"), @@ -148,7 +148,7 @@ module Mint def destructure( node : Ast::TypeDestructuring, condition : Checkable, - variables : Array(VariableScope) = [] of VariableScope + variables : Array(VariableScope) = [] of VariableScope, ) cache[node] = condition diff --git a/src/type_checkers/here_document.cr b/src/type_checkers/here_document.cr index be292ebdf..fb96201d1 100644 --- a/src/type_checkers/here_document.cr +++ b/src/type_checkers/here_document.cr @@ -5,7 +5,7 @@ module Mint *, node : Ast::Node, type : Checkable, - got : Checkable + got : Checkable, ) error! :here_doc_interpolation_type_mismatch do block "An interpolation in a here document is causing a mismatch." diff --git a/src/type_checkers/locale.cr b/src/type_checkers/locale.cr index 45330b9e1..c175d56ac 100644 --- a/src/type_checkers/locale.cr +++ b/src/type_checkers/locale.cr @@ -13,7 +13,7 @@ module Mint *, language : String, node : Ast::Field, - prefix : String? + prefix : String?, ) return unless key = node.key diff --git a/src/type_checkers/operation.cr b/src/type_checkers/operation.cr index 1f6a06e2b..5509fa3c7 100644 --- a/src/type_checkers/operation.cr +++ b/src/type_checkers/operation.cr @@ -3,7 +3,7 @@ module Mint def operation_type_mismatch( right : TypeChecker::Checkable, left : TypeChecker::Checkable, - node : Ast::Node + node : Ast::Node, ) error! :operation_type_mismatch do block do @@ -19,7 +19,7 @@ module Mint def operation_plus_type_mismatch( value : TypeChecker::Checkable, node : Ast::Node, - side : String + side : String, ) error! :operation_plus_type_mismatch do block do @@ -40,7 +40,7 @@ module Mint value : TypeChecker::Checkable, operator : String, node : Ast::Node, - side : String + side : String, ) error! :operation_numeric_type_mismatch do block do @@ -58,7 +58,7 @@ module Mint value : TypeChecker::Checkable, operator : String, node : Ast::Node, - side : String + side : String, ) error! :operation_bool_type_mismatch do block do diff --git a/src/utils/markd_vdom_renderer.cr b/src/utils/markd_vdom_renderer.cr index f02ef0ef6..13d6fcea8 100644 --- a/src/utils/markd_vdom_renderer.cr +++ b/src/utils/markd_vdom_renderer.cr @@ -21,7 +21,7 @@ module Mint replacements : Array(Compiler::Compiled), document : Markd::Node, separator : String, - js : Compiler::Js + js : Compiler::Js, ) : Compiler::Compiled render( node: self.new.render(document, separator, highlight), @@ -35,7 +35,7 @@ module Mint highlight : Highlight = Highlight::None, replacements : Array(String), document : Markd::Node, - separator : String + separator : String, ) root = self.new.render(document, separator, highlight) @@ -74,7 +74,7 @@ module Mint replacements : Array(Compiler::Compiled), node : Node | String, separator : String, - js : Compiler::Js + js : Compiler::Js, ) : Compiler::Compiled case node in String @@ -122,7 +122,7 @@ module Mint def initialize( @tag : Compiler::Builtin | String, *, @attributes = {} of String => String, - @children = [] of Node | String + @children = [] of Node | String, ) end end @@ -134,7 +134,7 @@ module Mint def render( document : Markd::Node, separator : String, - highlight : Highlight + highlight : Highlight, ) : Node walker = document.walker diff --git a/src/workspace.cr b/src/workspace.cr index b9fb5f04d..2963e3b11 100644 --- a/src/workspace.cr +++ b/src/workspace.cr @@ -23,7 +23,7 @@ module Mint dot_env : String, @format : Bool, @check : Check, - @path : String + @path : String, ) @dot_env = File.basename(dot_env) @@ -73,7 +73,7 @@ module Mint *, column : Int64, path : String, - line : Int64 + line : Int64, ) : Array(Ast::Node) | Error map_error(ast, &.nodes_at_cursor( line: line, column: column, path: path))