Skip to main content

gdscript_hir/
lib.rs

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