mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 12:16:42 +01:00
document stuff; Thunk suffix -> prefix
This commit is contained in:
parent
f9f9051eb7
commit
9d250daa04
16 changed files with 162 additions and 125 deletions
|
|
@ -5,15 +5,8 @@ mod error; pub use self::error::*;
|
|||
mod token; pub use self::token::*;
|
||||
mod iter; pub use self::iter::*;
|
||||
mod context; pub use self::context::*;
|
||||
//mod atom; pub use self::atom::*;
|
||||
//mod atom_ref; pub use self::atom_ref::*;
|
||||
//mod atom_arc; pub use self::atom_arc::*;
|
||||
pub(crate) use self::Value::*;
|
||||
pub(crate) use self::ParseError::*;
|
||||
//pub(crate) use self::TokenKind::*;
|
||||
pub(crate) use std::sync::Arc;
|
||||
//pub(crate) use std::marker::ConstParamTy;
|
||||
pub(crate) use itertools::join;
|
||||
pub(crate) use konst::iter::{ConstIntoIter, IsIteratorKind};
|
||||
pub(crate) use konst::string::{split_at, str_range, char_indices};
|
||||
pub(crate) use std::error::Error;
|
||||
|
|
@ -81,27 +74,27 @@ pub(crate) use std::fmt::{Debug, Display, Formatter, Result as FormatResult, Err
|
|||
|
||||
Ok(())
|
||||
}
|
||||
#[cfg(test)] #[test] fn test_examples () -> Result<(), ParseError> {
|
||||
let src = include_str!("../../tek/src/view_arranger.edn");
|
||||
let mut view = SourceIter(src);
|
||||
assert_eq!(view.0, src);
|
||||
let mut expr = view.peek();
|
||||
assert_eq!(view.0, src);
|
||||
assert_eq!(expr, Some(Token {
|
||||
source: src,
|
||||
start: 0,
|
||||
length: src.len(),
|
||||
value: Exp(0, SourceIter(&src[1..]))
|
||||
}));
|
||||
//panic!("{view:?}");
|
||||
//panic!("{:#?}", expr);
|
||||
//for example in [
|
||||
//include_str!("../../tui/examples/edn01.edn"),
|
||||
//include_str!("../../tui/examples/edn02.edn"),
|
||||
//] {
|
||||
////let items = Atom::read_all(example)?;
|
||||
////panic!("{layout:?}");
|
||||
////let content = <dyn ViewContext<::tek_engine::tui::Tui>>::from(&layout);
|
||||
//}
|
||||
Ok(())
|
||||
}
|
||||
//#[cfg(test)] #[test] fn test_examples () -> Result<(), ParseError> {
|
||||
//// Let's pretend to render some view.
|
||||
//let source = include_str!("../../tek/src/view_arranger.edn");
|
||||
//// The token iterator allows you to get the tokens represented by the source text.
|
||||
//let mut view = TokenIter(source);
|
||||
//// The token iterator wraps a const token+source iterator.
|
||||
//assert_eq!(view.0.0, source);
|
||||
//let mut expr = view.peek();
|
||||
//assert_eq!(view.0.0, source);
|
||||
//assert_eq!(expr, Some(Token {
|
||||
//source, start: 0, length: source.len() - 1, value: Exp(0, SourceIter(&source[1..]))
|
||||
//}));
|
||||
////panic!("{view:?}");
|
||||
////panic!("{:#?}", expr);
|
||||
////for example in [
|
||||
////include_str!("../../tui/examples/edn01.edn"),
|
||||
////include_str!("../../tui/examples/edn02.edn"),
|
||||
////] {
|
||||
//////let items = Atom::read_all(example)?;
|
||||
//////panic!("{layout:?}");
|
||||
//////let content = <dyn ViewContext<::tek_engine::tui::Tui>>::from(&layout);
|
||||
////}
|
||||
//Ok(())
|
||||
//}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue