Skip to main content

Crate brink_db

Crate brink_db 

Source
Expand description

Incremental project database for inkle’s ink narrative scripting language.

ProjectDb caches parsed trees and lowered HIR per file, enabling efficient re-analysis when individual files change. Both the compiler (one-shot) and LSP (long-lived) use this as their project model.

Structs§

FileId
Opaque identifier for a source file within a multi-file project.
ProjectDb
Stateful incremental project database.

Functions§

compute_relative_path
Compute the relative INCLUDE target to reach to_file from from_file’s directory — the inverse of resolve_include_path: normalize(resolve_include_path(from_file, compute_relative_path(from_file, to_file))) == to_file for both forward and ..-traversing layouts. Used when a file is renamed/moved to rewrite every INCLUDE that points at it (and the moved file’s own includes).
resolve_include_path
Resolve an INCLUDE path relative to the including file’s directory.