pub struct Parser<'a> { /* private fields */ }Expand description
The parser: a lexer, a token buffer, an arena, and a depth charge.
Implementations§
Source§impl<'a> Parser<'a>
impl<'a> Parser<'a>
Sourcepub fn new(source: &'a [u8], offset: usize, limits: &'a Limits) -> Parser<'a>
pub fn new(source: &'a [u8], offset: usize, limits: &'a Limits) -> Parser<'a>
Returns a parser positioned at an offset in the source.
Sourcepub fn with_arena(
source: &'a [u8],
offset: usize,
limits: &'a Limits,
arena: Ast,
) -> Parser<'a>
pub fn with_arena( source: &'a [u8], offset: usize, limits: &'a Limits, arena: Ast, ) -> Parser<'a>
Returns a parser that fills an arena the caller supplies.
For a caller that parses one statement after another. The arena is
cleared rather than dropped, so the second parse pushes into capacity
the first one took - see Ast::clear. Nothing else differs: the arena
is filled and handed back exactly as new’s own is.
@param source - the SQL text @param offset - where in it this statement starts @param limits - the limits to enforce @param arena - the arena to fill, cleared first
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> UnsafeUnpin 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