pub struct WolframParser<'config> { /* private fields */ }Expand description
Parser for the Wolfram language.
Implementations§
Source§impl<'config> WolframParser<'config>
impl<'config> WolframParser<'config>
Sourcepub fn new(config: &'config WolframLanguage) -> Self
pub fn new(config: &'config WolframLanguage) -> Self
Creates a new WolframParser with the given configuration.
Trait Implementations§
Source§impl<'config> Clone for WolframParser<'config>
impl<'config> Clone for WolframParser<'config>
Source§fn clone(&self) -> WolframParser<'config>
fn clone(&self) -> WolframParser<'config>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'config> Debug for WolframParser<'config>
impl<'config> Debug for WolframParser<'config>
Source§impl<'config> Parser<WolframLanguage> for WolframParser<'config>
impl<'config> Parser<WolframLanguage> for WolframParser<'config>
Source§fn parse<'a, S: Source + ?Sized>(
&self,
text: &'a S,
edits: &[TextEdit],
cache: &'a mut impl ParseCache<WolframLanguage>,
) -> ParseOutput<'a, WolframLanguage>
fn parse<'a, S: Source + ?Sized>( &self, text: &'a S, edits: &[TextEdit], cache: &'a mut impl ParseCache<WolframLanguage>, ) -> ParseOutput<'a, WolframLanguage>
The core parsing entry point for converting tokens into a syntax tree. Read more
Source§impl<'config> Pratt<WolframLanguage> for WolframParser<'config>
impl<'config> Pratt<WolframLanguage> for WolframParser<'config>
Source§fn primary<'a, S: Source + ?Sized>(
&self,
state: &mut ParserState<'a, WolframLanguage, S>,
) -> &'a GreenNode<'a, WolframLanguage>
fn primary<'a, S: Source + ?Sized>( &self, state: &mut ParserState<'a, WolframLanguage, S>, ) -> &'a GreenNode<'a, WolframLanguage>
Parses a primary expression (e.g., literals, identifiers, group).
Source§fn prefix<'a, S: Source + ?Sized>(
&self,
state: &mut ParserState<'a, WolframLanguage, S>,
) -> &'a GreenNode<'a, WolframLanguage>
fn prefix<'a, S: Source + ?Sized>( &self, state: &mut ParserState<'a, WolframLanguage, S>, ) -> &'a GreenNode<'a, WolframLanguage>
Handles prefix operators and primary expressions. Read more
Source§fn infix<'a, S: Source + ?Sized>(
&self,
state: &mut ParserState<'a, WolframLanguage, S>,
left: &'a GreenNode<'a, WolframLanguage>,
min_precedence: u8,
) -> Option<&'a GreenNode<'a, WolframLanguage>>
fn infix<'a, S: Source + ?Sized>( &self, state: &mut ParserState<'a, WolframLanguage, S>, left: &'a GreenNode<'a, WolframLanguage>, min_precedence: u8, ) -> Option<&'a GreenNode<'a, WolframLanguage>>
Handles infix and postfix operators. Read more
Auto Trait Implementations§
impl<'config> Freeze for WolframParser<'config>
impl<'config> RefUnwindSafe for WolframParser<'config>
impl<'config> Send for WolframParser<'config>
impl<'config> Sync for WolframParser<'config>
impl<'config> Unpin for WolframParser<'config>
impl<'config> UnsafeUnpin for WolframParser<'config>
impl<'config> UnwindSafe for WolframParser<'config>
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