Crate ezno_checker
source ·Expand description
Ezno’s Checker
Contains type checking logic.
See specification for what is currently implemented.
The synthesis folder contains logic for Ezno’s parser. See oxc_type_synthesis for similar code that connects the logic with OXCs AST.
Testing
Set EZNO_DEBUG to any value to trace diagnostic information from the crate::utils::notify! macro (In powershell = $Env:EZNO_DEBUG=1)
Re-exports
pub use context::GeneralContext;pub use context::RootContext;pub use diagnostics::Diagnostic;pub use diagnostics::DiagnosticKind;pub use diagnostics::DiagnosticsContainer;pub use types::calling::call_type_handle_errors;pub use types::poly_types::GenericTypeParameters;pub use types::subtyping;pub use types::properties::PropertyValue;pub use types::Constant;pub use types::Type;pub use types::TypeId;pub use context::facts::Facts;pub use context::Environment;pub use context::Scope;pub use source_map;pub use structures::jsx::*;
Modules
- Environments provide maps between string keys and types and variables
- Contains type checking errors, warnings and related structures
- Side effects which are not described in return types… Such as variable reassignment, function calling etc
- Contains definitions and implementations of structures used throughout the checker
Structs
- Contains logic for checking phase (none of the later steps) All data is global, non local to current scope TODO some of these should be mutex / ref cell
- TODO split for annotations based functions
- Contains all the modules and mappings for import statements
- Used for transformers and other things after checking!!!!
- A identifier for a crate::Source
- Options for type checking TODO figure out compat with tsc
TypeMappingsis used to retaining information between passes, including the synthesise and checking passes This for use in the both use in the compiler and compiler plugins Checking things are held on [crate::Memory], function things are held on [crate::HoistedFunctionContainer] and module things oncrate::ModuleData
Enums
- See https://www.internalpointers.com/post/understanding-meaning-lexpressions-and-rexpressions-c for a understanding of
LValuevsRValue - TODO