pub struct Parser { /* private fields */ }Implementations§
Source§impl Parser
impl Parser
pub fn new(source: &str) -> Result<Self, ParseError>
Sourcepub fn with_span_base(source: &str, base: u32) -> Result<Self, ParseError>
pub fn with_span_base(source: &str, base: u32) -> Result<Self, ParseError>
Lex source as if it began at byte base in the outer file (interpolation, #95).
pub fn parse_file(&mut self) -> Result<SourceFile, ParseError>
pub fn parse_module(&mut self) -> Result<Vec<Item>, ParseError>
Auto Trait Implementations§
impl Freeze for Parser
impl RefUnwindSafe for Parser
impl Send for Parser
impl Sync for Parser
impl Unpin for Parser
impl UnsafeUnpin for Parser
impl UnwindSafe for Parser
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