Lexeme

Enum Lexeme 

Source
pub enum Lexeme<'a> {
Show 36 variants Whitespace { source: &'a str, }, Comment { source: &'a str, }, Meta { form_ix: FormIx, data_ix: FormIx, source: &'a str, }, Discard { form_ix: FormIx, source: &'a str, }, Quote { form_ix: FormIx, source: &'a str, }, VarQuote { form_ix: FormIx, source: &'a str, }, Synquote { form_ix: FormIx, source: &'a str, }, Unquote { form_ix: FormIx, source: &'a str, }, SplicingUnquote { form_ix: FormIx, source: &'a str, }, Nil { form_ix: FormIx, source: &'a str, }, Boolean { form_ix: FormIx, value: bool, source: &'a str, }, Numeric { form_ix: FormIx, class: NumberClass, value: NumericValue<'a>, source: &'a str, }, Char { form_ix: FormIx, syntax: CharSyntax, value: char, source: &'a str, }, String { form_ix: FormIx, value: Box<[StringFragment<'a>]>, source: &'a str, }, Regex { form_ix: FormIx, source: &'a str, }, SymbolicValuePrefix { form_ix: FormIx, source: &'a str, }, SymbolicValue { form_ix: FormIx, value: SymbolicValue<'a>, source: &'a str, }, Symbol { form_ix: FormIx, namespace: Option<&'a str>, name: &'a str, source: &'a str, }, Tag { form_ix: FormIx, namespace: Option<&'a str>, name: &'a str, source: &'a str, }, Keyword { form_ix: FormIx, alias: bool, namespace: Option<&'a str>, name: &'a str, source: &'a str, }, StartList { form_ix: FormIx, source: &'a str, }, EndList { form_ix: FormIx, source: &'a str, }, StartVector { form_ix: FormIx, source: &'a str, }, EndVector { form_ix: FormIx, source: &'a str, }, StartSet { form_ix: FormIx, source: &'a str, }, EndSet { form_ix: FormIx, source: &'a str, }, MapQualifier { form_ix: FormIx, source: &'a str, }, StartMap { form_ix: FormIx, alias: bool, namespace: Option<&'a str>, source: &'a str, }, EndMap { form_ix: FormIx, source: &'a str, }, StartAnonymousFn { form_ix: FormIx, source: &'a str, }, EndAnonymousFn { form_ix: FormIx, source: &'a str, }, ReaderConditionalPrefix { form_ix: FormIx, source: &'a str, }, StartReaderConditional { form_ix: FormIx, splicing: bool, source: &'a str, }, EndReaderConditional { form_ix: FormIx, source: &'a str, }, TaggedLiteral { form_ix: FormIx, tag_ix: FormIx, arg_ix: FormIx, source: &'a str, }, Residual(Pair<'a, Rule>),
}

Variants§

§

Whitespace

Whitespace

Fields

§source: &'a str
§

Comment

Comment

Fields

§source: &'a str

The original source for the comment line.

Effectively the end of the line starting from the comment marker up to but excluding the line break. Note that in addition to ; the comment marker can be #!.

§

Meta

Meta data prefix (^ or #^)

Fields

§form_ix: FormIx

The form to which the meta data is attached. In essence, the form that owns the meta data.

§data_ix: FormIx

The form which contains the meta data itself.

§source: &'a str

The original source for the meta data prefix. Effectively either "^" or "#^".

§

Discard

Fields

§form_ix: FormIx
§source: &'a str
§

Quote

Fields

§form_ix: FormIx
§source: &'a str
§

VarQuote

Fields

§form_ix: FormIx
§source: &'a str
§

Synquote

Fields

§form_ix: FormIx
§source: &'a str
§

Unquote

Fields

§form_ix: FormIx
§source: &'a str
§

SplicingUnquote

Fields

§form_ix: FormIx
§source: &'a str
§

Nil

Fields

§form_ix: FormIx
§source: &'a str
§

Boolean

Fields

§form_ix: FormIx
§value: bool
§source: &'a str
§

Numeric

Fields

§form_ix: FormIx
§value: NumericValue<'a>
§source: &'a str
§

Char

Fields

§form_ix: FormIx
§syntax: CharSyntax
§value: char
§source: &'a str
§

String

Fields

§form_ix: FormIx
§value: Box<[StringFragment<'a>]>
§source: &'a str
§

Regex

Fields

§form_ix: FormIx
§source: &'a str
§

SymbolicValuePrefix

Fields

§form_ix: FormIx
§source: &'a str
§

SymbolicValue

Fields

§form_ix: FormIx
§value: SymbolicValue<'a>
§source: &'a str
§

Symbol

Fields

§form_ix: FormIx
§namespace: Option<&'a str>
§name: &'a str
§source: &'a str
§

Tag

Fields

§form_ix: FormIx
§namespace: Option<&'a str>
§name: &'a str
§source: &'a str
§

Keyword

Fields

§form_ix: FormIx
§alias: bool
§namespace: Option<&'a str>
§name: &'a str
§source: &'a str
§

StartList

Fields

§form_ix: FormIx
§source: &'a str
§

EndList

Fields

§form_ix: FormIx
§source: &'a str
§

StartVector

Fields

§form_ix: FormIx
§source: &'a str
§

EndVector

Fields

§form_ix: FormIx
§source: &'a str
§

StartSet

Fields

§form_ix: FormIx
§source: &'a str
§

EndSet

Fields

§form_ix: FormIx
§source: &'a str
§

MapQualifier

Fields

§form_ix: FormIx
§source: &'a str
§

StartMap

Fields

§form_ix: FormIx
§alias: bool
§namespace: Option<&'a str>
§source: &'a str
§

EndMap

Fields

§form_ix: FormIx
§source: &'a str
§

StartAnonymousFn

Fields

§form_ix: FormIx
§source: &'a str
§

EndAnonymousFn

Fields

§form_ix: FormIx
§source: &'a str
§

ReaderConditionalPrefix

Fields

§form_ix: FormIx
§source: &'a str
§

StartReaderConditional

Fields

§form_ix: FormIx
§splicing: bool
§source: &'a str
§

EndReaderConditional

Fields

§form_ix: FormIx
§source: &'a str
§

TaggedLiteral

Fields

§form_ix: FormIx
§tag_ix: FormIx
§arg_ix: FormIx
§source: &'a str
§

Residual(Pair<'a, Rule>)

Trait Implementations§

Source§

impl<'a> Debug for Lexeme<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for Lexeme<'a>

§

impl<'a> RefUnwindSafe for Lexeme<'a>

§

impl<'a> !Send for Lexeme<'a>

§

impl<'a> !Sync for Lexeme<'a>

§

impl<'a> Unpin for Lexeme<'a>

§

impl<'a> UnwindSafe for Lexeme<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.