redid the parser, patched up the project too.

This commit is contained in:
2022-07-03 18:01:40 +02:00
parent 6fb4b581b1
commit 2b55fae10d
30 changed files with 967 additions and 570 deletions

View File

@@ -1,25 +1,23 @@
use std::collections::HashMap;
mod resolve_names;
mod rule_collector;
// pub use rule_collector::rule_collector;
mod prefix;
mod name_resolver;
mod expr;
#[derive(Debug, Clone)]
pub struct Project {
pub modules: HashMap<Vec<String>, Module>,
}
mod loaded;
pub use loaded::Loaded;
mod parse_error;
mod file_loader;
pub use file_loader::file_loader;
#[derive(Debug, Clone)]
pub struct Module {
pub substitutions: Vec<Substitution>,
pub rules: Vec<Rule>,
pub exports: Vec<String>,
pub references: Vec<Vec<String>>
}
#[derive(Debug, Clone)]
pub struct Substitution {
pub source: expr::Expr,
pub struct Rule {
pub source: super::Expr,
pub priority: f64,
pub target: expr::Expr
pub target: super::Expr
}