:3
This commit is contained in:
@@ -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::*;
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user