pub struct Parser<'a> { /* private fields */ }Expand description
Parser state — wraps a Lexer and builds arena-allocated AST nodes.
The parser consumes tokens from the lexer and constructs S-expression trees in the arena. It handles list building, dotted pairs, quote desugaring, and vector literals.
Implementations§
Source§impl<'a> Parser<'a>
impl<'a> Parser<'a>
Sourcepub fn from_bytes(input: &'a [u8]) -> Parser<'a>
pub fn from_bytes(input: &'a [u8]) -> Parser<'a>
Create from bytes
Sourcepub fn parse<const N: usize>(
&mut self,
lisp: &Lisp<N>,
) -> Result<ArenaIndex, ParseError>
pub fn parse<const N: usize>( &mut self, lisp: &Lisp<N>, ) -> Result<ArenaIndex, ParseError>
Parse a single expression
Auto Trait Implementations§
impl<'a> Freeze for Parser<'a>
impl<'a> RefUnwindSafe for Parser<'a>
impl<'a> Send for Parser<'a>
impl<'a> Sync for Parser<'a>
impl<'a> Unpin for Parser<'a>
impl<'a> UnwindSafe for Parser<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more