pub struct Options { /* private fields */ }
Expand description
Various options to influence parser behavior.
Implementations§
Source§impl Options
impl Options
Sourcepub fn new() -> Self
pub fn new() -> Self
Construct an empty set of options.
This will recognize no keywords, and parse nil
and t
as
regular symbols.
Sourcepub fn with_keyword_syntax(self, syntax: KeywordSyntax) -> Self
pub fn with_keyword_syntax(self, syntax: KeywordSyntax) -> Self
Add syntax
to the recognized keyword syntaxes.
Sourcepub fn with_keyword_syntaxes<I, T>(self, styles: I) -> Self
pub fn with_keyword_syntaxes<I, T>(self, styles: I) -> Self
Set the recognized keyword syntaxes.
Sourcepub fn with_nil_symbol(self, treatment: NilSymbol) -> Self
pub fn with_nil_symbol(self, treatment: NilSymbol) -> Self
Choose how to parse the nil
symbol.
Sourcepub fn with_t_symbol(self, treatment: TSymbol) -> Self
pub fn with_t_symbol(self, treatment: TSymbol) -> Self
Choose how to parse the t
symbol.
Sourcepub fn with_brackets(self, treatment: Brackets) -> Self
pub fn with_brackets(self, treatment: Brackets) -> Self
Choose how to handle brackets.
Sourcepub fn with_string_syntax(self, syntax: StringSyntax) -> Self
pub fn with_string_syntax(self, syntax: StringSyntax) -> Self
Choose the accepted string syntax.
Sourcepub fn with_char_syntax(self, syntax: CharSyntax) -> Self
pub fn with_char_syntax(self, syntax: CharSyntax) -> Self
Choose the accepted character syntax.
Sourcepub fn keyword_syntax(self, syntax: KeywordSyntax) -> bool
pub fn keyword_syntax(self, syntax: KeywordSyntax) -> bool
Check wether a keyword syntax is enabled.
Sourcepub fn nil_symbol(self) -> NilSymbol
pub fn nil_symbol(self) -> NilSymbol
Query the way the nil
symbol is handled.
Sourcepub fn string_syntax(self) -> StringSyntax
pub fn string_syntax(self) -> StringSyntax
Query the accepted string syntax.
Sourcepub fn char_syntax(self) -> CharSyntax
pub fn char_syntax(self) -> CharSyntax
Query the accepted character syntax.
Trait Implementations§
impl Copy for Options
Auto Trait Implementations§
impl Freeze for Options
impl RefUnwindSafe for Options
impl Send for Options
impl Sync for Options
impl Unpin for Options
impl UnwindSafe for Options
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