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) -> Selfwhere
I: IntoIterator<Item = T>,
T: Borrow<KeywordSyntax>,
pub fn with_keyword_syntaxes<I, T>(self, styles: I) -> Selfwhere I: IntoIterator<Item = T>, T: Borrow<KeywordSyntax>,
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.