From 160b64427d79290a59ac48c9babca064232d8dfd Mon Sep 17 00:00:00 2001 From: Tolmachev Igor Date: Sat, 9 May 2026 20:47:04 +0300 Subject: Make project structure more consistent --- compiler/src/ast/mod.rs | 34 ++-------------------------------- 1 file changed, 2 insertions(+), 32 deletions(-) (limited to 'compiler/src/ast/mod.rs') diff --git a/compiler/src/ast/mod.rs b/compiler/src/ast/mod.rs index 8e35baf..2a0be03 100644 --- a/compiler/src/ast/mod.rs +++ b/compiler/src/ast/mod.rs @@ -1,40 +1,10 @@ mod error; +mod models; mod parser; -use std::rc::Rc; - -use crate::span::Spanned; pub use error::Error; +pub use models::{Ast, Atom, Expr}; pub use parser::Parser; #[cfg(test)] mod tests; - -#[derive(Clone, Debug, PartialEq)] -pub enum Atom { - Float(f64), - Integer(i64), - String(Rc), - Symbol(Rc), - Bool(bool), - Nil, -} - -#[derive(Clone, Debug, PartialEq)] -pub enum Expr { - Atom(Atom), - List(Vec>), -} - -#[derive(Clone, Debug, PartialEq)] -pub struct Program(Vec>); - -impl Program { - pub fn inner(&self) -> &[Spanned] { - &self.0 - } - - pub fn into_inner(self) -> Vec> { - self.0 - } -} -- cgit v1.3