Crate miden_diagnostics

Source

Modules§

term
Terminal back-end for emitting diagnostics.

Structs§

ByteIndex
A byte position in a source file.
ByteOffset
A byte offset in a source file
CaptureEmitter
CaptureEmitter is used to capture diagnostics which are emitted, for later examination.
CodeMap
CodeMap is a thread-safe structure for recording source code files and their contents for use in diagnostics and parsing/compilation.
ColumnIndex
A zero-indexed column offset into a source file
ColumnNumber
A 1-indexed column number. Useful for pretty printing source locations.
ColumnOffset
A column offset in a source file
DefaultEmitter
DefaultEmitter is used for rendering to stderr, and as is implied by the name, is the default emitter implementation.
DiagnosticsConfig
DiagnosticsHandler
DiagnosticsHandler acts as the nexus point for configuring and emitting diagnostics. It puts together many of the pieces provided by this crate to provide a useful and convenient interface for handling diagnostics throughout a compiler.
FatalError
Used as a return value to signify a fatal error occurred
InFlightDiagnostic
Constructs an in-flight diagnostic using the builder pattern
LineIndex
A zero-indexed line offset into a source file
LineNumber
A 1-indexed line number. Useful for pretty printing source locations.
LineOffset
A line offset in a source file
Location
A location in a source file.
NullEmitter
NullEmitter is used to silence diagnostics entirely, without changing anything in the diagnostic infrastructure.
SourceFile
The representation of a source file in the database.
SourceId
A handle that points to a file in the codemap.
SourceIndex
SourceIndex is a compact representation of a byte index in a specific source file.
SourceSpan
Represents a range of bytes in a specific source file
Span
Span is used to wrap types which do not implement Spanned in a type that does.

Enums§

Error
An enum representing an error that happened while looking up a file or a piece of content in that file.
FileName
A FileName represents the name of a logical source code file, while retaining some context about whether that file is a real file on disk, or a “virtual” file, i.e. only exists in memory.
LabelStyle
Severity
A severity level for diagnostic messages.
Verbosity

Traits§

Emitter
The Emitter trait is used for controlling how diagnostics are displayed.
Files
A minimal interface for accessing source files when rendering diagnostics.
Index
Index types
Offset
A relative offset between two indices
Spanned
This trait is implemented by any type which has a canoncial SourceSpan
ToDiagnostic
ToDiagnostic should be implemented on types which can be converted to a Diagnostic.

Type Aliases§

Diagnostic
Label
RawIndex
The raw, untyped index. We use a 32-bit integer here for space efficiency, assuming we won’t be working with sources larger than 4GB.
RawOffset
The raw, untyped offset.

Derive Macros§

Spanned