Changed most everything
This commit is contained in:
@@ -1,53 +1,25 @@
|
||||
use std::collections::HashMap;
|
||||
|
||||
mod resolve_names;
|
||||
|
||||
mod prefix;
|
||||
mod name_resolver;
|
||||
mod expr;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Project {
|
||||
pub modules: HashMap<Vec<String>, Module>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Export {
|
||||
isSymbol: bool,
|
||||
subpaths: HashMap<String, Export>
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Module {
|
||||
pub substitutions: Vec<Substitution>,
|
||||
pub exports: HashMap<String, Export>,
|
||||
pub all_ops: Vec<String>
|
||||
pub exports: Vec<String>,
|
||||
pub references: Vec<Vec<String>>
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Substitution {
|
||||
pub source: Expr,
|
||||
pub source: expr::Expr,
|
||||
pub priority: f64,
|
||||
pub target: Expr
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum Literal {
|
||||
Num(f64),
|
||||
Int(u64),
|
||||
Char(char),
|
||||
Str(String),
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum Token {
|
||||
Literal(Literal),
|
||||
Name(String),
|
||||
Bound,
|
||||
S(Vec<Expr>),
|
||||
Lambda(Vec<Vec<usize>>, Option<Box<Expr>>, Vec<Expr>),
|
||||
Auto(Option<Vec<Vec<usize>>>, Option<Box<Expr>>, Vec<Expr>)
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Expr {
|
||||
pub token: Token,
|
||||
pub typ: Box<Expr>
|
||||
pub target: expr::Expr
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user