feat(xatu): add let order rule

This commit is contained in:
2026-09-19 23:42:25 -04:00
parent f9aff6839e
commit d62aab7557
10 changed files with 236 additions and 16 deletions

View File

@@ -29,6 +29,7 @@ impl std::fmt::Display for SourceRange {
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum NodeData {
Binding(Binding),
LetBlock(LetBlock),
}
#[derive(Debug, Clone, PartialEq, Eq)]
@@ -37,6 +38,18 @@ pub struct Binding {
pub value: Expr,
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct LetBlock {
pub bindings: Vec<LetBinding>,
pub body_references: Vec<Ident>,
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct LetBinding {
pub name: Ident,
pub references: Vec<Ident>,
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct Ident {
pub name: String,