refactoring: remove dependency on SimpleFiles, make tree parsing multithreaded

This commit is contained in:
りき萌 2024-11-26 22:58:02 +01:00
parent 505163383f
commit 0713b59063
11 changed files with 283 additions and 177 deletions

View file

@ -2,6 +2,8 @@ use std::collections::HashMap;
use serde::{Deserialize, Serialize};
use crate::{state::FileId, vfs::VPathBuf};
/// Top-level `%%` root attributes.
#[derive(Debug, Default, Clone, PartialEq, Eq, Deserialize, Serialize)]
pub struct RootAttributes {
@ -118,7 +120,12 @@ pub enum Content {
///
/// Note that `Link` branches must not contain any children. If a `Link` branch does contain
/// children, an `attribute`-type error is raised.
Link(String),
Link(VPathBuf),
/// Valid link to another tree.
/// This replaces `Content::Link` during semantic analysis.
#[serde(skip)]
ResolvedLink(FileId),
}
#[derive(Debug, Default, Clone, PartialEq, Eq, Deserialize)]