Replaced all the *Box with a generic LocBox<T>

This commit is contained in:
2024-12-22 02:17:43 +02:00
parent b8728b8f8d
commit d5f02cf1d5
15 changed files with 241 additions and 281 deletions

View File

@@ -2,6 +2,7 @@ use std::collections::HashMap;
use statement::{Enum, Function, Struct, TypeAlias};
use crate::common::loc::LocBox;
pub use crate::tokeniser::tokentype::*;
pub mod expr;
@@ -21,8 +22,8 @@ pub struct Program {
#[derive(Debug, Clone)]
pub enum Ast {
Expr(expr::ExprBox),
Statement(statement::StatementBox),
Expr(LocBox<expr::Expr>),
Statement(LocBox<statement::Statement>),
}