sipha_core/lib.rs
1//! sipha's core foundation types and traits.
2//!
3//! This crate provides the minimal foundation for the sipha parser ecosystem:
4//! - Core traits: `TokenKind`, `RuleId`, `NodeId`, `SymbolId`, `GrammarContext`
5//! - Basic types: `Span`, `Token`, `TokenTrivia`
6//!
7//! This crate has minimal dependencies and contains no parsing logic.
8
9pub mod span;
10pub mod token;
11pub mod traits;
12
13/// Prelude module containing commonly used types and traits.
14///
15/// Import this module with `use sipha_core::prelude::*;` to get all the
16/// essential types needed to build a parser.
17pub mod prelude {
18 pub use crate::{
19 span::Span,
20 token::{Token, TokenTrivia},
21 traits::{GrammarContext, NodeId, RuleId, SymbolId, TokenKind},
22 };
23}
24
25pub use crate::{
26 span::Span,
27 token::{Token, TokenTrivia},
28 traits::{GrammarContext, NodeId, RuleId, SymbolId, TokenKind},
29};