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
//! # Dazzle Core
//!
//! Core library for Dazzle: Scheme interpreter (ported from OpenJade),
//! DSSSL engine, and trait definitions for groves and backends.
//!
//! ## Architecture
//!
//! Dazzle follows OpenJade's clean separation:
//!
//! - `grove`: Trait definitions for document tree abstraction (like OpenJade's grove/)
//! - `fot`: Trait definitions for flow object tree backends (like OpenJade's FOTBuilder)
//! - `scheme`: Scheme interpreter (ported from OpenJade's style/)
//! - `value`: Scheme value types (ELObj equivalent)
//! - `parser`: S-expression parser (SchemeParser.cxx equivalent)
//! - `interpreter`: Evaluator and environment (Interpreter.cxx equivalent)
//! - `primitives`: All 236 DSSSL primitives (primitive.cxx equivalent)
//! - `dsssl`: DSSSL style engine (processing modes, rules, etc.)
//!
//! ## Design Principles
//!
//! 1. **Trait-based abstraction**: Groves and backends are defined as traits,
//! allowing multiple implementations without coupling to the interpreter.
//!
//! 2. **Faithful port**: Preserves OpenJade's proven design and performance optimizations
//! (instruction-based evaluation, string interning, lazy node lists).
//!
//! 3. **100% compatibility**: All valid R4RS/DSSSL code that works in OpenJade
//! works in Dazzle without modification.
// Re-export key types for convenience
pub use FotBuilder;
pub use ;
pub use ;
/// Dazzle version
pub const VERSION: &str = env!;