Skip to main content

Crate bock_errors

Crate bock_errors 

Source
Expand description

Bock errors — diagnostic types, span, file-id, and error reporting infrastructure.

Span and FileId are defined here (not in bock-source) to avoid circular dependencies. Every crate in the pipeline uses these types transitively.

Modules§

catalog
Catalog of diagnostic codes emitted by the compiler.

Structs§

Diagnostic
A structured compiler diagnostic.
DiagnosticBag
Accumulates diagnostics emitted during a compilation pass.
DiagnosticCode
A structured diagnostic code like E0001 or W0042.
FileId
Identifies a source file within the compilation session.
Label
A secondary label pointing at a span with an explanatory message.
Span
A byte-offset span within a source file.

Enums§

Severity
Diagnostic severity level.

Functions§

levenshtein
Levenshtein edit distance between two strings.
render
Render a slice of diagnostics to a string using ariadne for source context.
suggest_similar
Find the closest candidate within max_distance edits of name.