pub enum AstNodeType {
Show 13 variants
Object {
statements: Vec<AstNode>,
},
Function {
name: String,
params: Vec<String>,
returns: Vec<String>,
body: Box<AstNode>,
},
Block {
statements: Vec<AstNode>,
},
If {
condition: Box<AstNode>,
then_branch: Box<AstNode>,
else_branch: Option<Box<AstNode>>,
},
For {
init: Option<Box<AstNode>>,
condition: Box<AstNode>,
update: Option<Box<AstNode>>,
body: Box<AstNode>,
},
Switch {
expression: Box<AstNode>,
cases: Vec<SwitchCase>,
default: Option<Box<AstNode>>,
},
FunctionCall {
name: String,
arguments: Vec<AstNode>,
},
Assignment {
targets: Vec<String>,
value: Box<AstNode>,
},
Identifier {
name: String,
},
Literal {
value: String,
},
Leave,
Break,
Continue,
}Variants§
Object
Function
Block
If
For
Fields
Switch
FunctionCall
Assignment
Identifier
Literal
Leave
Break
Continue
Trait Implementations§
Source§impl Clone for AstNodeType
impl Clone for AstNodeType
Source§fn clone(&self) -> AstNodeType
fn clone(&self) -> AstNodeType
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AstNodeType
impl RefUnwindSafe for AstNodeType
impl Send for AstNodeType
impl Sync for AstNodeType
impl Unpin for AstNodeType
impl UnwindSafe for AstNodeType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more