pub struct Options { /* private fields */ }Expand description
Various options to influence parser behavior.
Implementations§
Source§impl Options
impl Options
Sourcepub fn new() -> Options
pub fn new() -> Options
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) -> Options
pub fn with_keyword_syntax(self, syntax: KeywordSyntax) -> Options
Add syntax to the recognized keyword syntaxes.
Sourcepub fn with_keyword_syntaxes<I, T>(self, styles: I) -> Options
pub fn with_keyword_syntaxes<I, T>(self, styles: I) -> Options
Set the recognized keyword syntaxes.
Sourcepub fn with_nil_symbol(self, treatment: NilSymbol) -> Options
pub fn with_nil_symbol(self, treatment: NilSymbol) -> Options
Choose how to parse the nil symbol.
Sourcepub fn with_t_symbol(self, treatment: TSymbol) -> Options
pub fn with_t_symbol(self, treatment: TSymbol) -> Options
Choose how to parse the t symbol.
Sourcepub fn with_brackets(self, treatment: Brackets) -> Options
pub fn with_brackets(self, treatment: Brackets) -> Options
Choose how to handle brackets.
Sourcepub fn with_string_syntax(self, syntax: StringSyntax) -> Options
pub fn with_string_syntax(self, syntax: StringSyntax) -> Options
Choose the accepted string syntax.
Sourcepub fn with_char_syntax(self, syntax: CharSyntax) -> Options
pub fn with_char_syntax(self, syntax: CharSyntax) -> Options
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§
Source§impl Default for Options
impl Default for Options
Source§fn default() -> Options
fn default() -> Options
Construct a default set of options. This corresponds most closely to the Scheme dialect of S-expressions:
- The identifiers
nilandtare treated as regular symbols. - Only octothorpe keywords are recognized.
- Brackets are treated just like parentheses, i.e. indicating a list.
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