- syntax tree datatypes
- prototype lex function - a lex unit test - gitignore - library structure - license
This commit is contained in:
commit
e4f2fbaa70
8 changed files with 995 additions and 0 deletions
14
tests/test_lex.rs
Normal file
14
tests/test_lex.rs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
mod lex_tests {
|
||||
use relish::ast::{lex};
|
||||
|
||||
#[test]
|
||||
fn test_lex_basic_list() {
|
||||
let document: &str = "(hello \"world\")";
|
||||
match lex(document.to_string()) {
|
||||
Ok(box_cell) => {
|
||||
assert_eq!(format!("{}", *box_cell), document.to_string());
|
||||
},
|
||||
Err(_s) => assert!(false)
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue