pub struct Parser { /* private fields */ }Expand description
Parser state
Implementations§
Source§impl Parser
impl Parser
Sourcepub fn with_bigint_threshold(input: &str, bigint_threshold: usize) -> Self
pub fn with_bigint_threshold(input: &str, bigint_threshold: usize) -> Self
Create a new parser with a custom big-integer threshold
Sourcepub fn parse_expression_source(input: &str) -> Result<Expr, ParseError>
pub fn parse_expression_source(input: &str) -> Result<Expr, ParseError>
解析独立表达式字符串(调试器条件断点使用): 解析单个表达式后要求输入恰好耗尽(允许首尾换行), 有多余 token 视为非法条件。
Sourcepub fn parse_program(&mut self) -> Result<Program, ParseError>
pub fn parse_program(&mut self) -> Result<Program, ParseError>
Parse a complete program
Auto Trait Implementations§
impl Forget for Parser
impl Freeze for Parser
impl Move 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