styx_parse/
lib.rs

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