Start of typechecking and other processing of ast after parsing
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
use std::collections::HashMap;
|
||||
|
||||
use statement::{Enum, Function, Struct, TypeAlias};
|
||||
use statement::{Enum, Function, Struct};
|
||||
|
||||
use crate::common::loc::LocBox;
|
||||
use crate::{common::loc::LocBox, validator::predefined::TypeType};
|
||||
pub use crate::tokeniser::tokentype::*;
|
||||
|
||||
pub mod expr;
|
||||
@@ -13,11 +13,11 @@ pub mod typ;
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Program {
|
||||
pub ast: expr::Block,
|
||||
pub structs: HashMap<Ident, Struct>,
|
||||
pub enums: HashMap<Ident, Enum>,
|
||||
pub types: HashMap<Ident, TypeAlias>,
|
||||
pub functions: HashMap<Ident, Function>,
|
||||
pub member_functions: HashMap<Ident, HashMap<Ident, Function>>,
|
||||
pub structs: HashMap<Ident, LocBox<Struct>>,
|
||||
pub enums: HashMap<Ident, LocBox<Enum>>,
|
||||
pub types: HashMap<Ident, TypeType>,
|
||||
pub functions: HashMap<Ident, LocBox<Function>>,
|
||||
pub member_functions: HashMap<Ident, HashMap<Ident, LocBox<Function>>>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
|
||||
Reference in New Issue
Block a user