1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
//! lispexp — a pure-Rust reader (lexer + parser) for S-expression syntax across
//! many Lisp dialects.
//!
//! The crate is deliberately reader-only: it does not evaluate, expand macros,
//! or interpret the numeric tower. See `docs/design.md` and `docs/adr/` for the
//! design and the decisions behind it.
//!
//! Two public layers sit over the same [`Options`] (ADR-0015):
//!
//! - [`lex`] / [`Lexer`] — a linear token stream that tiles the input, for
//! consumers like a parinfer backend that need lexical state, not a tree.
//! - [`parse`] — builds the [`Parsed`] datum tree on top of the lexer.
//!
//! The lexer's EOF contract: tokens always tile the input, and an
//! unterminated construct at end-of-input is reported as one
//! [`TokenKind::Unterminated`] token carrying the lexical state it was in,
//! rather than an error or a truncated token stream.
//!
//! # Example
//!
//! ```
//! use lispexp::{parse, Options};
//!
//! let parsed = parse("(define (square x) (* x x))", &Options::scheme());
//! assert!(parsed.errors.is_empty());
//! assert_eq!(parsed.data[0].head_symbol(), Some("define"));
//! assert_eq!(parsed.data[0].items().unwrap().len(), 3);
//! ```
pub use ;
pub use ;
pub use ;
pub use LineIndex;
pub use ;
pub use ;
pub use Span;
pub use ;
pub use ;