pub struct Parser {
pub current: Option<Token>,
/* private fields */
}Fields§
§current: Option<Token>Implementations§
Source§impl Parser
impl Parser
pub fn new(source: &str) -> Self
pub fn parse(&mut self) -> ParseResult<Node>
pub fn parse_with_recovery(&mut self) -> (Option<Node>, Vec<ParserError>)
pub fn parse_block_statement(&mut self) -> ParseResult<Node>
pub fn parse_expression(&mut self) -> ParseResult<Node>
pub fn parse_equality_expression(&mut self) -> ParseResult<Node>
pub fn parse_primary_expression(&mut self) -> ParseResult<Node>
pub fn parse_parameters(&mut self) -> ParseResult<Vec<Node>>
pub fn parse_arguments(&mut self) -> ParseResult<Vec<Node>>
pub fn parse_function_body(&mut self) -> ParseResult<Node>
pub fn parse_class_body(&mut self) -> ParseResult<Node>
pub fn parse_identifier(&mut self) -> ParseResult<Node>
pub fn current_token_string(&self) -> String
pub fn check(&self, token_kind: TokenKind) -> bool
pub fn check_identifier(&self) -> bool
pub fn expect(&mut self, token_kind: TokenKind) -> ParseResult<()>
pub fn advance(&mut self)
pub fn is_eof(&self) -> bool
pub fn current_position(&self) -> Option<Position>
pub fn create_span_from_tokens(&self) -> Span
pub fn is_assignment_operator(&self) -> bool
pub fn is_relational_operator(&self) -> bool
pub fn is_shift_operator(&self) -> bool
pub fn is_additive_operator(&self) -> bool
pub fn is_multiplicative_operator(&self) -> bool
pub fn is_exponentiation_operator(&self) -> bool
pub fn is_unary_operator(&self) -> bool
pub fn parse_destructuring_pattern(&mut self) -> ParseResult<Node>
Source§impl Parser
impl Parser
pub fn parse_additive_expression(&mut self) -> ParseResult<Node>
pub fn parse_multiplicative_expression(&mut self) -> ParseResult<Node>
pub fn parse_exponentiation_expression(&mut self) -> ParseResult<Node>
Source§impl Parser
impl Parser
pub fn parse_assignment_expression(&mut self) -> ParseResult<Node>
Source§impl Parser
impl Parser
pub fn parse_relational_expression(&mut self) -> ParseResult<Node>
pub fn parse_shift_expression(&mut self) -> ParseResult<Node>
Source§impl Parser
impl Parser
pub fn parse_logical_or_expression(&mut self) -> ParseResult<Node>
pub fn parse_logical_and_expression(&mut self) -> ParseResult<Node>
Source§impl Parser
impl Parser
pub fn parse_unary_expression(&mut self) -> ParseResult<Node>
pub fn parse_postfix_expression(&mut self) -> ParseResult<Node>
Source§impl Parser
impl Parser
pub fn parse_array_literal(&mut self) -> ParseResult<Node>
Source§impl Parser
impl Parser
pub fn parse_class_expression(&mut self) -> ParseResult<Node>
Source§impl Parser
impl Parser
pub fn parse_function_expression(&mut self) -> ParseResult<Node>
Source§impl Parser
impl Parser
pub fn parse_new_expression(&mut self) -> ParseResult<Node>
Source§impl Parser
impl Parser
pub fn parse_object_literal(&mut self) -> ParseResult<Node>
pub fn parse_property(&mut self) -> ParseResult<Node>
Source§impl Parser
impl Parser
pub fn parse_class_declaration(&mut self) -> ParseResult<Node>
Source§impl Parser
impl Parser
pub fn parse_break_statement(&mut self) -> ParseResult<Node>
pub fn parse_continue_statement(&mut self) -> ParseResult<Node>
pub fn parse_throw_statement(&mut self) -> ParseResult<Node>
pub fn parse_try_statement(&mut self) -> ParseResult<Node>
pub fn parse_catch_clause(&mut self) -> ParseResult<Node>
Source§impl Parser
impl Parser
pub fn parse_function_declaration(&mut self) -> ParseResult<Node>
Source§impl Parser
impl Parser
pub fn parse_variable_declaration(&mut self) -> ParseResult<Node>
pub fn parse_variable_declaration_without_semicolon( &mut self, ) -> ParseResult<Node>
Auto Trait Implementations§
impl Freeze for Parser
impl RefUnwindSafe for Parser
impl Send for Parser
impl Sync for Parser
impl Unpin 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