Expand description
Processing of µcad source code.
This module includes all components to parse, resolve and evaluate µcad code and diagnose errors.
- Load and parse source files in
parseandsyntax - Resolve parsed sources in
resolve - Evaluate resolved sources in
eval - Diagnose any evaluation errors in
diag
The grammar of µcad can be found here.
Good starting point to understand how µcad syntax works: syntax::SourceFile::load() loads a µcad source file.
Modules§
- builtin
- Builtin module
- diag
- Handling of diagnostic errors.
- eval
- Evaluation of parsed content.
- model
- Model tree module
- ord_map
- Ordered Map
- parse
- Source code parsing
- parser
- µcad Code Parser
- rc
- Short-cut definition of
Rc<std::cell::RefCell<T>>andRc<T> - render
- Model methods and trait implementations for rendering.
- resolve
- Single symbol resolving
- src_ref
- Source code references.
- syntax
- µcad syntax elements.
- tree_
display - Display trait for tree like output
- ty
- µcad syntax elements of types
- value
- Evaluation entities.
Macros§
- argument
- Shortcut to create a argument value
- create_
tuple - Create a Tuple from items
- create_
tuple_ value - Create a Value::Tuple from items
- eval_
todo - Like
todo!()but within a evaluation context - find_
rule - Find rule or use default with proper error handling.
- find_
rule_ exact - Find rule and return definition or
ParseError::NotAvailablewith proper error handling. - find_
rule_ opt - Find rule and return optional with proper error handling.
- invalid
- Generate string literal
INVALIDXXXwith ANSI color. - invalid_
no_ ansi - Generate string literal
<INVALIDXXX>. - mark
- Create a marker string which is colored with ANSI.
- parameter
- Shortcut to create a
ParameterValue - parse
- Parse a rule from given string into a syntax element.
- property
- Create tuple of stringified
Identifierand aValue - shorten
- Shortens given string to it’s first line and to maximum characters.
- tuple_
expression - Create TupleExpression from µcad code
Constants§
- MICROCAD_
EXTENSIONS - List of valid µcad extensions.
Functions§
- shorten
- Shortens given string to it’s first line and to
max_charscharacters.
Type Aliases§
- Id
- Id type (base of all identifiers)