[−][src]Enum passerine::compiler::ast::AST
Represents an item in a sugared AST
.
Which is the direct result of parsing
Each syntax-level construct has it's own AST
variant.
When macros are added, for instance, they will be here,
But not in the CST
, which is the desugared syntax tree,
and represents language-level constructs
Variants
Symbol(String)
Data(Data)
Pattern(ASTPattern)
ArgPat(ArgPat)
Implementations
impl AST
[src]
pub fn assign(pattern: Spanned<ASTPattern>, expression: Spanned<AST>) -> AST
[src]
Shortcut for creating an AST::Assign
variant.
pub fn lambda(pattern: Spanned<ASTPattern>, expression: Spanned<AST>) -> AST
[src]
Shortcut for creating an AST::Lambda
variant.
pub fn composition(argument: Spanned<AST>, function: Spanned<AST>) -> AST
[src]
pub fn syntax(arg_pat: Spanned<ArgPat>, expression: Spanned<AST>) -> AST
[src]
Shortcut for creating an AST::Syntax
variant.
i.e. a macro definition
Trait Implementations
impl Clone for AST
[src]
impl Debug for AST
[src]
impl PartialEq<AST> for AST
[src]
impl StructuralPartialEq for AST
[src]
impl TryFrom<AST> for ASTPattern
[src]
type Error = String
The type returned in the event of a conversion error.
pub fn try_from(ast: AST) -> Result<Self, Self::Error>
[src]
impl TryFrom<AST> for ArgPat
[src]
Auto Trait Implementations
impl !RefUnwindSafe for AST
impl !Send for AST
impl !Sync for AST
impl Unpin for AST
impl !UnwindSafe for AST
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,