Enum passerine::compiler::cst::CST[][src]

pub enum CST {
    Symbol(String),
    Data(Data),
    Block(Vec<Spanned<CST>>),
    Assign {
        pattern: Box<Spanned<CSTPattern>>,
        expression: Box<Spanned<CST>>,
    },
    Lambda {
        pattern: Box<Spanned<CSTPattern>>,
        expression: Box<Spanned<CST>>,
    },
    Call {
        fun: Box<Spanned<CST>>,
        arg: Box<Spanned<CST>>,
    },
    Print(Box<Spanned<CST>>),
    Label(StringBox<Spanned<CST>>),
    Tuple(Vec<Spanned<CST>>),
    FFI {
        name: String,
        expression: Box<Spanned<CST>>,
    },
}

Represents an item in a desugaredCST. Each langauge-level construct has it's own CST variant. Note that, for instance, call only takes two arguments, Whereas it's originally parsed as a AST::Form.

Variants

Symbol(String)
Data(Data)
Block(Vec<Spanned<CST>>)
Assign

Fields of Assign

pattern: Box<Spanned<CSTPattern>>expression: Box<Spanned<CST>>
Lambda

Fields of Lambda

pattern: Box<Spanned<CSTPattern>>expression: Box<Spanned<CST>>
Call

Fields of Call

fun: Box<Spanned<CST>>arg: Box<Spanned<CST>>
Print(Box<Spanned<CST>>)
Label(StringBox<Spanned<CST>>)
Tuple(Vec<Spanned<CST>>)
FFI

Fields of FFI

name: Stringexpression: Box<Spanned<CST>>

Implementations

impl CST[src]

pub fn assign(pattern: Spanned<CSTPattern>, expression: Spanned<CST>) -> CST[src]

Shortcut for creating an CST::Assign variant.

pub fn lambda(pattern: Spanned<CSTPattern>, expression: Spanned<CST>) -> CST[src]

Shortcut for creating an CST::Lambda variant.

pub fn call(fun: Spanned<CST>, arg: Spanned<CST>) -> CST[src]

Shortcut for creating a CST::Lambda variant.

pub fn ffi(name: &str, expression: Spanned<CST>) -> CST[src]

Trait Implementations

impl Clone for CST[src]

impl Debug for CST[src]

impl PartialEq<CST> for CST[src]

impl StructuralPartialEq for CST[src]

Auto Trait Implementations

impl !RefUnwindSafe for CST[src]

impl !Send for CST[src]

impl !Sync for CST[src]

impl Unpin for CST[src]

impl !UnwindSafe for CST[src]

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

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

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.