mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 12:16:42 +01:00
once again, why did i begin to refactor this
This commit is contained in:
parent
297f9b30df
commit
798de37172
15 changed files with 582 additions and 602 deletions
|
|
@ -1,8 +1,6 @@
|
|||
#![feature(type_alias_impl_trait)]
|
||||
#![feature(impl_trait_in_fn_trait_return)]
|
||||
mod token; pub use self::token::*;
|
||||
mod provide; pub use self::provide::*;
|
||||
mod describe; pub use self::describe::*;
|
||||
mod token; pub use self::token::*;
|
||||
pub(crate) use std::fmt::{Debug, Display, Formatter, Error as FormatError};
|
||||
pub(crate) use std::sync::Arc;
|
||||
#[cfg(test)] #[test] fn test_lang () -> Result<(), ParseError> {
|
||||
|
|
@ -32,10 +30,18 @@ pub(crate) use std::sync::Arc;
|
|||
] {
|
||||
let items = Atom::read_all(example)?;
|
||||
//panic!("{layout:?}");
|
||||
//let content = <dyn EdnViewData<::tek_engine::tui::Tui>>::from(&layout);
|
||||
//let content = <dyn ViewContext<::tek_engine::tui::Tui>>::from(&layout);
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
#[macro_export] macro_rules! from_edn {
|
||||
($($x:tt)*) => {}
|
||||
#[cfg(test)] #[test] fn test_token () -> Result<(), Box<dyn std::error::Error>> {
|
||||
use Token::*;
|
||||
assert_eq!(Nil, Token::chomp_one("")?);
|
||||
assert_eq!(Nil, Token::chomp_one(" \n \r \t ")?);
|
||||
assert_eq!(Num("8", 0, 1), Token::chomp_one("8")?);
|
||||
assert_eq!(Num(" 8 ", 3, 1), Token::chomp_one(" 8 ")?);
|
||||
assert_eq!(Sym(":foo", 0, 4), Token::chomp_one(":foo")?);
|
||||
assert_eq!(Sym("@bar", 0, 4), Token::chomp_one("@bar")?);
|
||||
assert_eq!(Key("foo/bar", 0, 7), Token::chomp_one("foo/bar")?);
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue