sipha_error/lib.rs
1//! Error handling and diagnostics for sipha parsers.
2//!
3//! This crate provides:
4//! - `ParseError` enum for parse errors
5//! - `Expected` type for describing expected tokens
6//! - `Diagnostic` and `DiagnosticBuilder` (when diagnostics feature enabled)
7//! - Error recovery utilities
8
9pub mod diagnostic;
10pub mod error;
11pub mod expected;
12
13// Re-export ErrorContext from error module
14pub use error::ErrorContext;
15
16/// Prelude module containing commonly used error types.
17pub mod prelude {
18 #[cfg(feature = "diagnostics")]
19 pub use crate::diagnostic::{Diagnostic, DiagnosticBuilder, Level};
20 pub use crate::{error::ParseError, expected::Expected};
21}
22
23pub use crate::{error::ParseError, expected::Expected};
24
25#[cfg(feature = "diagnostics")]
26pub use crate::diagnostic::{Diagnostic, DiagnosticBuilder, Level};