← All news
Milestone · November 5, 2026

Milestone 0.2.42: Lexical Scope Recognition Foundation

The compiler can identify the nested lexical blocks enclosing a discovered direct function call.

Cudrix milestone 0.2.42 — Lexical Scope Recognition Foundation is complete.

The lookup_direct_call_enclosing_blocks(...) API identifies the chain of lexical blocks that contain a discovered direct named call. It returns borrowed references to the original BlockSyntax nodes in outermost-to-innermost order, beginning with the enclosing function body and continuing through applicable conditional or loop blocks.

Recognizing the block ancestry gives subsequent semantic work a dependable view of a call’s structural context without building a persistent scope graph. It does not yet determine declaration visibility, name shadowing, forward-reference rules, or which declaration a name ultimately binds to.

Verification recorded 524 library tests and 77 public API tests passing (601 total), with formatting and strict Clippy checks passing. Final commit: 08d6c9ffcfaaac35dbd596aaf043d257b5b23a22.