From a29adeeef376b73e17ecfef97febe82695d39f10 Mon Sep 17 00:00:00 2001 From: John Date: Fri, 24 Oct 2025 05:26:07 -0400 Subject: [PATCH] ast: move typedef up --- src/ast.rs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/ast.rs b/src/ast.rs index c9b1a6c..b0798a4 100644 --- a/src/ast.rs +++ b/src/ast.rs @@ -114,6 +114,17 @@ pub enum PatOp { Alt, } +/// A record-type definition +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct Typedef(pub TypedefKind, pub Pat); + +/// The type of type being defined +#[derive(Clone, Debug, PartialEq, Eq)] +pub enum TypedefKind { + Struct, + Enum, +} + /// A pattern binding /// ```ignore /// let Pat (= Expr (else Expr)?)? @@ -162,17 +173,6 @@ pub struct Make(pub Anno, A>, pub Vec>) #[derive(Clone, Debug, PartialEq, Eq)] pub struct MakeArm(pub String, pub Option, A>>); -/// A record-type definition -#[derive(Clone, Debug, PartialEq, Eq)] -pub struct Typedef(pub TypedefKind, pub Pat); - -/// The type of type being defined -#[derive(Clone, Debug, PartialEq, Eq)] -pub enum TypedefKind { - Struct, - Enum, -} - /// Expressions: The beating heart of Dough #[derive(Clone, Debug, PartialEq, Eq)] pub enum Expr {