[][src]Struct lexpr::parse::Options

pub struct Options { /* fields omitted */ }

Various options to influence parser behavior.

Methods

impl Options[src]

pub fn new() -> Self[src]

Construct an empty set of options.

This will recognize no keywords, and parse nil and t as regular symbols.

pub fn elisp() -> Self[src]

Construct a set of options suitable for parsing Emacs Lisp.

pub fn with_keyword_style(self, style: KeywordStyle) -> Self[src]

Add style to the recognized keyword styles.

pub fn with_keyword_styles<I, T>(self, styles: I) -> Self where
    I: IntoIterator<Item = T>,
    T: Borrow<KeywordStyle>, 
[src]

Set the recognized keyword styles.

pub fn with_nil_symbol(self, handling: NilSymbol) -> Self[src]

Choose how to parse the nil symbol.

pub fn with_t_symbol(self, handling: TSymbol) -> Self[src]

Choose how to parse the t symbol.

pub fn keyword_style(&self, style: KeywordStyle) -> bool[src]

Check wether a keyword style is enabled.

pub fn nil_symbol(&self) -> NilSymbol[src]

Query the way the nil symbol is handled.

pub fn t_symbol(&self) -> TSymbol[src]

Query the way the t symbol is handled.

Trait Implementations

impl Default for Options[src]

fn default() -> Self[src]

Construct a default set of options. This corresponds most closely to the Scheme dialect of S-expressions:

  • The identifiers nil and t are treated as regular symbols.
  • Only octothorpe keywords are recognized.

impl Clone for Options[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Options[src]

Auto Trait Implementations

impl Send for Options

impl Sync for Options

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.