offsides 0.1.1

Layout-sensitive virtual-token lexer adapter for logos + lalrpop
Documentation
//! Layout-sensitive (off-side rule) lexer adapter for `logos` + `lalrpop`
//! pipelines.
//!
//! [`LayoutLexer`] wraps any `Iterator<Item = Result<(usize, T, usize), E>>`
//! and splices virtual open/close/separator tokens into the stream based on
//! the indentation of the input. The downstream parser sees a clean
//! brace-and-semicolon shape and never has to think about columns.
//!
//! ```ignore
//! use offsides::{LayoutLexer, LayoutConfig, LayoutMode};
//!
//! let cfg = LayoutConfig::new(is_layout_opener).with_mode(LayoutMode::Lazy);
//! let layout = LayoutLexer::new(my_logos_lexer, source, cfg);
//! let ast = MyParser::new().parse(layout)?;
//! ```
//!
//! Composes with `marginalia::TriviaLexer`; see the `blocklet` example.

mod column;
mod lexer;
mod stack;

pub mod layout;

pub use layout::{Layout, LayoutConfig, LayoutMode};
pub use lexer::LayoutLexer;