Comment out partial skeleton impl temporarily
This commit is contained in:
parent
a334134079
commit
4a9606ff5d
118
src/skeleton.rs
118
src/skeleton.rs
|
@ -1,73 +1,73 @@
|
||||||
use std::collections::BTreeMap;
|
// use std::collections::BTreeMap;
|
||||||
use std::collections::BTreeSet;
|
// use std::collections::BTreeSet;
|
||||||
use super::bag::BTreeBag;
|
// use super::bag::BTreeBag;
|
||||||
use preserves::value::AValue;
|
// use preserves::value::AValue;
|
||||||
|
|
||||||
pub enum Event {
|
// pub enum Event {
|
||||||
Removed,
|
// Removed,
|
||||||
Message,
|
// Message,
|
||||||
Added,
|
// Added,
|
||||||
}
|
// }
|
||||||
|
|
||||||
type Path = Vec<usize>;
|
// type Path = Vec<usize>;
|
||||||
type Paths = Vec<Path>;
|
// type Paths = Vec<Path>;
|
||||||
type Captures = Vec<AValue>;
|
// type Captures = Vec<AValue>;
|
||||||
|
|
||||||
trait HandleEvent {
|
// trait HandleEvent {
|
||||||
fn handle_event<'a>(self, captures: &Captures);
|
// fn handle_event<'a>(self, captures: &Captures);
|
||||||
}
|
// }
|
||||||
|
|
||||||
pub enum Skeleton {
|
// pub enum Skeleton {
|
||||||
Blank,
|
// Blank,
|
||||||
Guarded(Guard, Vec<Skeleton>)
|
// Guarded(Guard, Vec<Skeleton>)
|
||||||
}
|
// }
|
||||||
|
|
||||||
pub struct AnalysisResults {
|
// pub struct AnalysisResults {
|
||||||
skeleton: Skeleton,
|
// skeleton: Skeleton,
|
||||||
const_paths: Paths,
|
// const_paths: Paths,
|
||||||
const_vals: Vec<AValue>,
|
// const_vals: Vec<AValue>,
|
||||||
capture_paths: Paths,
|
// capture_paths: Paths,
|
||||||
assertion: AValue,
|
// assertion: AValue,
|
||||||
}
|
// }
|
||||||
|
|
||||||
pub struct Index {
|
// pub struct Index {
|
||||||
all_assertions: BTreeBag<AValue>,
|
// all_assertions: BTreeBag<AValue>,
|
||||||
}
|
// }
|
||||||
|
|
||||||
impl Index {
|
// impl Index {
|
||||||
pub fn new() -> Self {
|
// pub fn new() -> Self {
|
||||||
Index{ all_assertions: BTreeBag::new() }
|
// Index{ all_assertions: BTreeBag::new() }
|
||||||
}
|
// }
|
||||||
|
|
||||||
// pub fn add_handler(analysis_results: AnalysisResults,
|
// // pub fn add_handler(analysis_results: AnalysisResults,
|
||||||
}
|
// }
|
||||||
|
|
||||||
struct Node {
|
// struct Node {
|
||||||
continuation: Continuation,
|
// continuation: Continuation,
|
||||||
edges: BTreeMap<Selector, BTreeMap<Guard, Node>>,
|
// edges: BTreeMap<Selector, BTreeMap<Guard, Node>>,
|
||||||
}
|
// }
|
||||||
|
|
||||||
struct Continuation {
|
// struct Continuation {
|
||||||
cached_assertions: BTreeSet<AValue>,
|
// cached_assertions: BTreeSet<AValue>,
|
||||||
leaf_map: BTreeMap<Paths, BTreeMap<Vec<AValue>, Leaf>>,
|
// leaf_map: BTreeMap<Paths, BTreeMap<Vec<AValue>, Leaf>>,
|
||||||
}
|
// }
|
||||||
|
|
||||||
struct Selector {
|
// struct Selector {
|
||||||
pop_count: usize,
|
// pop_count: usize,
|
||||||
index: usize,
|
// index: usize,
|
||||||
}
|
// }
|
||||||
|
|
||||||
enum Guard {
|
// enum Guard {
|
||||||
Rec(AValue, usize),
|
// Rec(AValue, usize),
|
||||||
Seq(usize),
|
// Seq(usize),
|
||||||
}
|
// }
|
||||||
|
|
||||||
struct Leaf { // aka Topic
|
// struct Leaf { // aka Topic
|
||||||
cached_assertions: BTreeSet<AValue>,
|
// cached_assertions: BTreeSet<AValue>,
|
||||||
handler_map: BTreeMap<Paths, Handler>,
|
// handler_map: BTreeMap<Paths, Handler>,
|
||||||
}
|
// }
|
||||||
|
|
||||||
struct Handler {
|
// struct Handler {
|
||||||
cached_captures: BTreeBag<Captures>,
|
// cached_captures: BTreeBag<Captures>,
|
||||||
callbacks: BTreeSet<Box<dyn HandleEvent>>,
|
// callbacks: BTreeSet<Box<dyn HandleEvent>>,
|
||||||
}
|
// }
|
||||||
|
|
Loading…
Reference in New Issue