Expand description
µcad language base components for error handling etc.
Macros§
- invalid
- Generate string literal
INVALIDXXXwith ANSI color. - invalid_
no_ ansi - Generate string literal
<INVALIDXXX>. - mark
- Create a marker string which is colored with ANSI.
- shorten
- Shortens given string to it’s first line and to maximum characters.
Structs§
- Diag
Handler - Handler for diagnostics.
- Diag
Render Options - Options that control the rendering of diagnostics
- Format
Tree - print syntax via std::fmt::Display
- Miette
Source File - 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.
- SrcRef
Inner - A reference into the source code
- Tree
State - Indention depth counter
Enums§
- Diag
Error - 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.
- GetSource
StrBy Hash - Trait that can fetch for a file by it’s hash value.
- Push
Diag - A trait to add diagnostics with different levels conveniently.
- SrcReferrer
- Elements holding a source code reference shall implement this trait
- Tree
Display - Trait for displaying a tree
- Write
ToFile - Trait to write something with Display trait into a file.
Functions§
- shorten
- Shortens given string to it’s first line and to
max_charscharacters.
Type Aliases§
- Diag
Result - Result type of any resolve.
- Id
- Id type (base of all identifiers)