This commit is contained in:
2024-07-18 16:07:36 +02:00
parent 949b3758fd
commit cc3699bbe7
31 changed files with 1021 additions and 312 deletions

24
orchid-host/src/tree.rs Normal file
View File

@@ -0,0 +1,24 @@
use std::ops::Range;
use orchid_api::tree::Paren;
use orchid_base::error::OwnedError;
use orchid_base::name::VName;
use orchid_base::tokens::OwnedPh;
use crate::extension::AtomHand;
#[derive(Clone)]
pub struct OwnedTokTree {
pub tok: OwnedTok,
pub range: Range<u32>,
}
#[derive(Clone)]
pub enum OwnedTok {
Lambda(Vec<OwnedTokTree>, Vec<OwnedTokTree>),
Name(VName),
S(Paren, Vec<OwnedTokTree>),
Atom(AtomHand),
Ph(OwnedPh),
Bottom(OwnedError),
}