[−][src]Struct ssexp::ParsingContext
Used in parsing process for getting chars and calling the parsers.
Implementations
impl<T: Iterator<Item = char>> ParsingContext<T>
[src]
pub fn parse(&mut self, tokens: &mut Vec<Token>) -> Option<MacroHandle<'_, T>>
[src]
Parses the next symbol and inserts it into a specified token list. Then a handle for the next macro call is returned.
pub fn set(
&mut self,
char: char,
value: Option<impl Parser<T> + 'static>
) -> Option<Rc<dyn Parser<T>>>
[src]
&mut self,
char: char,
value: Option<impl Parser<T> + 'static>
) -> Option<Rc<dyn Parser<T>>>
Binds a new parser to a character and returns some previous, if there was one defined, else returns None
pub fn insert(
&mut self,
char: char,
value: Option<Rc<dyn Parser<T>>>
) -> Option<Rc<dyn Parser<T>>>
[src]
&mut self,
char: char,
value: Option<Rc<dyn Parser<T>>>
) -> Option<Rc<dyn Parser<T>>>
Binds a new parser to a character and returns some previous, if there was one defined, else returns None
pub fn push(&mut self, map: MacroMap<T>)
[src]
Replaces the current macro map with a new one.
pub fn pop(&mut self) -> Option<MacroMap<T>>
[src]
Removes the current macro map and uses the most recent one.
Auto Trait Implementations
impl<T> !RefUnwindSafe for ParsingContext<T>
impl<T> !Send for ParsingContext<T>
impl<T> !Sync for ParsingContext<T>
impl<T> Unpin for ParsingContext<T> where
T: Unpin,
T: Unpin,
impl<T> !UnwindSafe for ParsingContext<T>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,