styx_parse/
lib.rs

1//! Event-based parser for the Styx configuration language.
2//!
3//! This crate provides a low-level lexer and event-based parser for Styx documents.
4//! It's designed to be used by higher-level tools like `styx-tree` (document tree)
5//! and `facet-styx` (serde-like deserialization).
6
7// Conditional tracing macros
8#[cfg(feature = "tracing")]
9macro_rules! trace {
10    ($($arg:tt)*) => { ::tracing::trace!($($arg)*) };
11}
12
13#[cfg(not(feature = "tracing"))]
14macro_rules! trace {
15    ($($arg:tt)*) => {};
16}
17
18#[allow(unused_imports)]
19pub(crate) use trace;
20
21pub mod callback;
22pub mod event;
23mod lexer;
24pub mod parser;
25mod span;
26mod token;
27
28pub use callback::ParseCallback;
29pub use event::{Event, ParseErrorKind, ScalarKind, Separator};
30pub use lexer::Lexer;
31pub use parser::Parser;
32pub use span::Span;
33pub use token::{Token, TokenKind};