[−][src]Struct ssexp::MacroMap
A map for storing the macro characters and their behaviours. Every character may be set as macro character.
Methods
impl<T: Iterator<Item = char>> MacroMap<T>
[src]
pub fn new() -> Self
[src]
Creates a new MacroMap
, which is used to save macro characters
pub fn with_separating_whitespaces(self) -> Self
[src]
Adds whitespaces as macro characters for splitting there into tokens.
pub fn with_lists(self, list_delimiter: char) -> Self
[src]
Adds a list_delimiter
as left delimiter of a list.
Only following characters are supported as delimiters:
(
)
[
]
{
}
<
>
pub fn with_strings(self, string_delimiter: char) -> Self
[src]
Adds the ability for parsing strings, using char string_delimiter
for delimiting strings.
A string will be parsed as list, whose first element is the symbol string
and whose second element is the string itself as symbol.
pub fn with_comments(self, comment_char: char) -> Self
[src]
Adds comment_char
as macro character for single line comments.
pub fn with_infix_left(self, infix_char: char) -> Self
[src]
Adds infix_char
as a left associative infix operator.
pub fn with_macro_character(self, char: char, value: MacroFn<T>) -> Self
[src]
Adds char
as a macro character with the user defined macro function value
pub fn from_hash_map(map: HashMap<char, MacroFn<T>>) -> Self
[src]
Creates a MacroMap
from a HashMap
pub fn set(
&mut self,
char: char,
value: Option<MacroFn<T>>
) -> Option<MacroFn<T>>
[src]
&mut self,
char: char,
value: Option<MacroFn<T>>
) -> Option<MacroFn<T>>
Adds a new user defined macro character char
.
Takes an Option
of the new macro function.
If the
Auto Trait Implementations
impl<T> RefUnwindSafe for MacroMap<T>
impl<T> Send for MacroMap<T>
impl<T> Sync for MacroMap<T>
impl<T> Unpin for MacroMap<T>
impl<T> UnwindSafe for MacroMap<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>,