FExp0

Enum FExp0 

Source
pub enum FExp0<'a> {
Show 14 variants App1(&'a FExp<'a>, &'a FExp<'a>), App2(&'a FExp<'a>, &'a FExp<'a>, &'a FExp<'a>), Var(&'a str), Keyword(&'a str), Tuple(Vec<'a, &'a FExp<'a>>), Block(Vec<'a, &'a FExp<'a>>, Option<&'a FExp<'a>>), Int(u64), Float(f64), Str(&'a str), Prim(&'a str), Special(&'a str), Field(&'a str), Tag(&'a str), Error,
}

Variants§

§

App1(&'a FExp<'a>, &'a FExp<'a>)

f x => App1(f, x)

§

App2(&'a FExp<'a>, &'a FExp<'a>, &'a FExp<'a>)

`x + y => App2(f, x, y)

§

Var(&'a str)

a => Var("a")

§

Keyword(&'a str)

= => Keyword("=")

§

Tuple(Vec<'a, &'a FExp<'a>>)

[x, y] => Tuple([x, y])

§

Block(Vec<'a, &'a FExp<'a>>, Option<&'a FExp<'a>>)

{ x; y; } => Block([x, y], None) { x; y; e } => Block([x, y], Some(e))

§

Int(u64)

3 => Int(3)

§

Float(f64)

3.0 => Float(3.0)

§

Str(&'a str)

“hello world” => Str(“hello world”)

§

Prim(&'a str)

@foo => Prim("foo")

§

Special(&'a str)

%bar => Special("bar")

§

Field(&'a str)

.first => Field("first")

§

Tag(&'a str)

'some => Tag("some")

§

Error

It may be possible to keep parsing after an error; when this happens we insert an Error node into the syntax tree where the error happened

Trait Implementations§

Source§

impl<'a> Debug for FExp0<'a>

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<'a> PartialEq for FExp0<'a>

Source§

fn eq(&self, other: &FExp0<'a>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'a> StructuralPartialEq for FExp0<'a>

Auto Trait Implementations§

§

impl<'a> Freeze for FExp0<'a>

§

impl<'a> !RefUnwindSafe for FExp0<'a>

§

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

§

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

§

impl<'a> Unpin for FExp0<'a>

§

impl<'a> !UnwindSafe for FExp0<'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.