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::Root;pub use diagnostics::Diagnostic;pub use diagnostics::DiagnosticKind;pub use diagnostics::DiagnosticsContainer;pub use structures::functions::FunctionPointer;pub use structures::functions::InternalFunctionId;pub use structures::modules::SynthesizedModule;pub use structures::variables::Variable;pub use types::calling::call_type_handle_errors;pub use types::poly_types::GenericTypeParameters;pub use types::subtyping;pub use types::properties::Property;pub use types::Constant;pub use types::Type;pub use types::TypeId;pub use context::Environment;pub use context::Scope;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
- Contains all the modules and mappings for import statements
- Because of hoisting
- A identifier for a crate::Source
- Settings for type checking TODO from toml, yml and json TODO reach compat with tsc
- TypeMappings is used to retaining information between passes, including the synthesize 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 on crate::ModuleData
Enums
- Increment and decrement are are not binary add subtract as they cast their lhs to number
- See https://www.internalpointers.com/post/understanding-meaning-lexpressions-and-rexpressions-c for a understanding of LValue vs RValue
- TODO