Skip to main content

gdscript_hir/
lib.rs

1//! `gdscript-hir` — the semantic / type layer.
2//!
3//! Lowers the AST to a HIR (an `ItemTree` of signatures + per-function `Body`), runs name resolution
4//! (local → class member → inherited → global), gradual type inference (Variant by default,
5//! `:=`/annotations, member lookup over the engine inheritance table, `is`/`as` narrowing), and the
6//! GDScript warning checks. Single-file in Phase 2; project-wide + scene-aware later.
7//!
8//! Phase 2 builds this out bottom-up: the type model ([`ty`]), then the item tree, body, name
9//! resolution, and inference. Must build for `wasm32`.
10#![cfg_attr(docsrs, feature(doc_cfg))]
11
12pub mod body;
13mod cst;
14pub mod def;
15pub mod infer;
16pub mod item_tree;
17pub mod project;
18pub mod queries;
19pub mod resolve;
20pub mod ty;
21
22pub use cst::AstPtr;