adding document mode

I've been thinking a lot about the treehouse and I feel like it's time to say goodbye to the tree format.
This commit is contained in:
りき萌 2025-07-10 16:50:41 +02:00
parent 550c062327
commit 36705e7c1e
31 changed files with 940 additions and 409 deletions

View file

@ -66,7 +66,8 @@ pub struct FileId(usize);
/// Treehouse compilation context.
pub struct Treehouse {
pub files: Vec<File>,
pub files_by_tree_path: HashMap<VPathBuf, FileId>,
pub files_by_tree_path: HashMap<VPathBuf, FileId>, // trees only
pub files_by_doc_path: HashMap<VPathBuf, FileId>, // docs only
pub feeds_by_name: HashMap<String, FileId>,
pub tree: SemaTree,
@ -83,6 +84,7 @@ impl Treehouse {
Self {
files: vec![],
files_by_tree_path: HashMap::new(),
files_by_doc_path: HashMap::new(),
feeds_by_name: HashMap::new(),
tree: SemaTree::default(),