pub struct JavaScriptParser { /* private fields */ }Implementations§
Source§impl JavaScriptParser
impl JavaScriptParser
pub fn new(config: JavaScriptLanguage) -> Self
Trait Implementations§
Source§impl Parser<JavaScriptLanguage> for JavaScriptParser
impl Parser<JavaScriptLanguage> for JavaScriptParser
Source§fn parse<'a, S: Source + ?Sized>(
&self,
text: &'a S,
edits: &[TextEdit],
cache: &'a mut impl ParseCache<JavaScriptLanguage>,
) -> ParseOutput<'a, JavaScriptLanguage>
fn parse<'a, S: Source + ?Sized>( &self, text: &'a S, edits: &[TextEdit], cache: &'a mut impl ParseCache<JavaScriptLanguage>, ) -> ParseOutput<'a, JavaScriptLanguage>
The core parsing entry point. Read more
Source§impl Pratt<JavaScriptLanguage> for JavaScriptParser
impl Pratt<JavaScriptLanguage> for JavaScriptParser
Source§fn primary<'a, S: Source + ?Sized>(
&self,
state: &mut ParserState<'a, JavaScriptLanguage, S>,
) -> &'a GreenNode<'a, JavaScriptLanguage>
fn primary<'a, S: Source + ?Sized>( &self, state: &mut ParserState<'a, JavaScriptLanguage, S>, ) -> &'a GreenNode<'a, JavaScriptLanguage>
Parses a primary expression (e.g., literals, identifiers, group).
Source§fn infix<'a, S: Source + ?Sized>(
&self,
state: &mut ParserState<'a, JavaScriptLanguage, S>,
left: &'a GreenNode<'a, JavaScriptLanguage>,
min_precedence: u8,
) -> Option<&'a GreenNode<'a, JavaScriptLanguage>>
fn infix<'a, S: Source + ?Sized>( &self, state: &mut ParserState<'a, JavaScriptLanguage, S>, left: &'a GreenNode<'a, JavaScriptLanguage>, min_precedence: u8, ) -> Option<&'a GreenNode<'a, JavaScriptLanguage>>
Handles infix and postfix operators. Read more
Auto Trait Implementations§
impl Freeze for JavaScriptParser
impl RefUnwindSafe for JavaScriptParser
impl Send for JavaScriptParser
impl Sync for JavaScriptParser
impl Unpin for JavaScriptParser
impl UnwindSafe for JavaScriptParser
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