fixup! tree: add tree branch reference

This commit is contained in:
Noah Hellman 2023-01-18 22:23:58 +01:00
parent 726f1bc7b0
commit cbead322ed
2 changed files with 5 additions and 5 deletions

View file

@ -9,6 +9,7 @@ use Container::*;
use Leaf::*; use Leaf::*;
pub type Tree = tree::Tree<Node, Atom>; pub type Tree = tree::Tree<Node, Atom>;
pub type Branch = tree::Branch<Node, Atom>;
pub type TreeBuilder = tree::Builder<Node, Atom>; pub type TreeBuilder = tree::Builder<Node, Atom>;
#[derive(Debug, Clone, Copy, PartialEq, Eq)] #[derive(Debug, Clone, Copy, PartialEq, Eq)]

View file

@ -266,13 +266,12 @@ impl<'s> Container<'s> {
pub struct Parser<'s> { pub struct Parser<'s> {
src: &'s str, src: &'s str,
tree: tree::Branch<block::Node, block::Atom>, _tree_data: block::Tree,
link_definitions: std::collections::HashMap<&'s str, CowStr<'s>>, link_definitions: std::collections::HashMap<&'s str, CowStr<'s>>,
tree: block::Branch,
inlines: span::InlineSpans<'s>, inlines: span::InlineSpans<'s>,
inline_parser: Option<inline::Parser<span::InlineCharsIter<'s>>>, inline_parser: Option<inline::Parser<span::InlineCharsIter<'s>>>,
_tree_data: block::Tree,
} }
impl<'s> Parser<'s> { impl<'s> Parser<'s> {
@ -303,11 +302,11 @@ impl<'s> Parser<'s> {
Self { Self {
src, src,
_tree_data: tree,
link_definitions,
tree: branch, tree: branch,
inlines: span::InlineSpans::new(src), inlines: span::InlineSpans::new(src),
inline_parser: None, inline_parser: None,
link_definitions,
_tree_data: tree,
} }
} }
} }