mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-13 23:26:41 +01:00
wip: EdnItem -> Atom, rewrite tokenizer
This commit is contained in:
parent
143cd24e09
commit
ff31957fed
39 changed files with 477 additions and 376 deletions
|
|
@ -93,8 +93,8 @@ impl<E: Output, A: Content<E>, B: Content<E>> BspAreas<E, A, B> for Bsp<E, A, B>
|
|||
fn contents (&self) -> (&A, &B) { (&self.2, &self.3) }
|
||||
}
|
||||
impl<'a, E: Output + 'a, T: EdnViewData<'a, E>> TryFromEdn<'a, T> for Bsp<E, RenderBox<'a, E>, RenderBox<'a, E>> {
|
||||
fn try_from_edn (s: &'a T, head: &EdnItem<impl AsRef<str>>, tail: &'a [EdnItem<impl AsRef<str>>]) -> Option<Self> {
|
||||
use EdnItem::*;
|
||||
fn try_from_edn (s: &'a T, head: &Atom<impl AsRef<str>>, tail: &'a [Atom<impl AsRef<str>>]) -> Option<Self> {
|
||||
use Atom::*;
|
||||
Some(match (head.to_ref(), tail) {
|
||||
(Key("bsp/n"), [a, b]) => Self::n(
|
||||
s.get_content(a).expect("no south"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue