class

Mint::Workspace

Inherits Reference < Object

A workspace represents a Mint project in the file system.

  • It provides up to date, type checked artifacts which can be used in other places (bundler, test runner, development server, etc...).
  • It watches the appropriate files and recompiles when they change.
  • It does a compilation on initialization, so artifacts are ready to be used.

Constructors

new(*, checked_entities : Array(String) = [] of String, listener : Proc(Result, Nil) | Nil, include_tests : Bool, dot_env : String, format : Bool, check : Check, path : String)
Source

Instance methods

artifacts
Source
ast(path : String) : Ast | Error | Nil
Source
check
Source
delete(path : String) : Nil
Source
format(node : Ast::Node | Nil) : String | Nil
Source
format(path : String) : String | Error | Nil
Source
formatter_config
Source
nodes_at_cursor(*, column : Int64, path : String, line : Int64) : Array(Ast::Node) | Error
Source
nodes_at_path(path : String)
Source
reset
Source
result

The current result of the program (type checker or error) and warnings.

Source
unchecked_ast
Source
update(contents : String, path : String) : Nil
Source
update(files : Array(String), reason : Symbol)
Source
warnings(value : TypeChecker | Error) : Array(Warning)
Source

Nested types