This commit is contained in:
2026-01-17 16:31:40 +02:00
parent 06d8c1b0f3
commit 158b76fe39
18 changed files with 783 additions and 113 deletions

View File

@@ -1,7 +1,7 @@
use std::{collections::HashMap, fmt::Display};
use anyhow::bail;
use parse_int::parse;
use crate::{common::{loc::LocIncr, Loc}, error, lerror};
use crate::{common::{loc::LocIncr, Loc},lerror};
pub mod tokentype;
use tokentype::*;

View File

@@ -1,6 +1,8 @@
use core::panic;
use std::fmt::Display;
use crate::parser::ast::expr::Path;
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct Ident(pub String);
@@ -10,6 +12,12 @@ impl Display for Ident {
}
}
impl Ident {
pub fn as_path(self) -> Path {
Path(vec![self])
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct Number {