Skip to main content

Crate microcad_lang_base

Crate microcad_lang_base 

Source
Expand description

µcad language base components for error handling etc.

Macros§

invalid
Generate string literal INVALIDXXX with ANSI color.
invalid_no_ansi
Generate string literal <INVALID XXX>.
mark
Create a marker string which is colored with ANSI.
shorten
Shortens given string to it’s first line and to maximum characters.

Structs§

DiagHandler
Handler for diagnostics.
DiagRenderOptions
Options that control the rendering of diagnostics
FormatTree
print syntax via std::fmt::Display
MietteSourceFile
A compatibility layer for using SourceFile with miette
Rc
A single-threaded reference-counting pointer. ‘Rc’ stands for ‘Reference Counted’.
RcMut
Just a short cut definition
Refer
Packs any value together with a source reference
SrcRef
Reference into a source file.
SrcRefInner
A reference into the source code
TreeState
Indention depth counter

Enums§

DiagError
Resolve error.
Diagnostic
Diagnostic message with source code reference attached.
Level
The level of the diagnostic.

Constants§

MICROCAD_EXTENSIONS
List of valid µcad extensions.

Traits§

Diag
Diagnosis trait gives access about collected errors.
GetSourceStrByHash
Trait that can fetch for a file by it’s hash value.
PushDiag
A trait to add diagnostics with different levels conveniently.
SrcReferrer
Elements holding a source code reference shall implement this trait
TreeDisplay
Trait for displaying a tree
WriteToFile
Trait to write something with Display trait into a file.

Functions§

shorten
Shortens given string to it’s first line and to max_chars characters.

Type Aliases§

DiagResult
Result type of any resolve.
Id
Id type (base of all identifiers)