Struct rsjsonnet_lang::parser::Parser
source · pub struct Parser<'a> { /* private fields */ }Implementations§
source§impl<'a> Parser<'a>
impl<'a> Parser<'a>
sourcepub fn new(
str_interner: &'a StrInterner,
span_mgr: &'a mut SpanManager,
tokens: Vec<Token>
) -> Self
pub fn new( str_interner: &'a StrInterner, span_mgr: &'a mut SpanManager, tokens: Vec<Token> ) -> Self
Creates a new parser that operates on tokens.
tokens must not include whitespace
or comments and must end with an
end-of-file token.
sourcepub fn parse_root_expr(self) -> Result<Expr, ParseError>
pub fn parse_root_expr(self) -> Result<Expr, ParseError>
Parses the tokens into an 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