cl-ast: Clean up "to", "extents", Module."kind"

This commit is contained in:
2025-03-14 00:52:43 -05:00
parent 11c8daaed0
commit 33e13425a9
13 changed files with 95 additions and 99 deletions

View File

@@ -62,7 +62,7 @@ pub enum MetaKind {
/// Anything that can appear at the top level of a [File]
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub struct Item {
pub extents: Span,
pub span: Span,
pub attrs: Attrs,
pub vis: Visibility,
pub kind: ItemKind,
@@ -96,13 +96,13 @@ pub enum ItemKind {
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub struct Module {
pub name: Sym,
pub kind: Option<File>,
pub file: Option<File>,
}
/// An alias to another [Ty]
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub struct Alias {
pub to: Sym,
pub name: Sym,
pub from: Option<Box<Ty>>,
}
@@ -212,7 +212,7 @@ pub enum UseTree {
/// A type expression
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub struct Ty {
pub extents: Span,
pub span: Span,
pub kind: TyKind,
}
@@ -283,7 +283,7 @@ pub enum PathPart {
/// An abstract statement, and associated metadata
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub struct Stmt {
pub extents: Span,
pub span: Span,
pub kind: StmtKind,
pub semi: Semi,
}
@@ -306,7 +306,7 @@ pub enum Semi {
/// An expression, the beating heart of the language
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub struct Expr {
pub extents: Span,
pub span: Span,
pub kind: ExprKind,
}