Skip to main content

Module parser

Module parser 

Source
Expand description

Shared primitives for parser token streams.

Every syntax crate in the workspace runs the same lookahead pattern: pull tokens from a lexer into a small ring buffer, serve up peek(n) / consume / pop_front against it, and never shrink back to zero. This module owns the buffer so there is one tuned implementation for all four grammars.

Structsยง

LookaheadBuf
Fixed-capacity ring buffer for parser lookahead.