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
// SPDX-License-Identifier: LGPL-3.0-or-later
// Ternlang — RFI-IRFOS Ternary Intelligence Stack
// Copyright (C) 2026 RFI-IRFOS
// Open-core compiler. See LICENSE-LGPL in the repository root.
//! # ternlang-core
//!
//! Compiler and VM for Ternlang — balanced ternary language with
//! affirm/tend/reject trit semantics, `@sparseskip` codegen, and BET
//! (Balanced Encoded Ternary) bytecode execution.
//!
//! ## Quick start
//!
//! ```no_run
//! use ternlang_core::{Trit, pack_trits, unpack_trits};
//!
//! let trits = vec![Trit::Affirm, Trit::Tend, Trit::Reject];
//! let packed = pack_trits(&trits);
//! let round_tripped = unpack_trits(&packed, trits.len()).unwrap();
//! assert_eq!(trits, round_tripped);
//! ```
// ─── Consolidated re-exports ───────────────────────────────────────
// Trit, TritBlock5, and packed arithmetic helpers all come from the
// types module so downstream crates (ternlang-ml, ternlang-mcp, etc.)
// can simply do `use ternlang_core::{Trit, TritBlock5, packed_add}`.
pub use ;
pub use Trit as LegacyTrit; // deprecated alias — do not use in new code
pub use ;
pub use ;
pub use Token;
pub use *;
pub use Parser;
pub use SemanticAnalyzer;
pub use BytecodeEmitter;
pub use ;