Skip to main content

Crate deed_diagnostics

Crate deed_diagnostics 

Source
Expand description

Source management and structured diagnostics for the Deed compiler.

Nothing here knows anything about the Deed language. It exists so that no part of the compiler ever has a reason to return an error as a string.

hashing is the odd one out and it is here because Span is: every pass keys a map by one, and the hash they are looked up with is a property of the key rather than of the pass.

See design/01-principles.md, P7.

Re-exports§

pub use diagnostic::Applicability;
pub use diagnostic::Diagnostic;
pub use diagnostic::Fix;
pub use diagnostic::Label;
pub use diagnostic::Severity;
pub use diagnostic::SuggestedEdit;
pub use hashing::ByNumber;
pub use render::json_string;
pub use render::render_human;
pub use render::render_json;
pub use source::FileId;
pub use source::Location;
pub use source::SourceFile;
pub use source::SourceMap;
pub use span::Span;

Modules§

diagnostic
Structured diagnostics.
hashing
A hash for keys that are already numbers.
render
Renderings of a Diagnostic.
source
Source files and the mapping from byte offsets back to line and column.
span
Byte ranges into a single source file.