Expand description
Everything relating in any way to GeoScript
. This is where the language gets parsed,
compiled and optimized. All errors are defined and reported here as well. The largest
module of Geo-AID
Modules§
- cli
- Utilities for console printing of diagnostics.
- figure
- Geo-AID’s figure Intermediate Representation and all definitions related to it.
Note that a part of it is also located in
geo-aid-figure
- geometry
- Utility crate providing functions for geometry computations.
- math
- Math stage is responsible for most if not all of the optimizations the compiler does. It’s at this point where rules are analyzed, expressions normalized, patterns that can be optimized optimized. It’s the final and most important stage of compilation.
- parser
- Parses
GeoScript
’s tokens into a structured representation. Most of this module’s functionality is autogenerated through macros. - token
- All functionality for turning scripts into series of tokens.
- ty
- Type constants
- unit
- Unit constants
- unroll
- The unroll step is where syntatic sugars are extended, type checks made and general script validity is checked. Technically, a script that makes it past unrolling is elligible to directly compiling and generating with no in-between steps.
Macros§
- span
- A helper span macro accepting start line and column and end line and column. All numbers are 1-based
- take_
nodes - Helper macro for taking nodes out of multiple expressions.
Structs§
- Complex
Unit - Defines a complex unit: a product of simple units.
Enums§
- Error
- A
GeoScript
error - Simple
Unit - Defines a simple unit.