pub enum AstKind {
Statement(StatementNode),
Function(FunctionNode),
Expression(ExprKind),
Return(ReturnNode),
Meta(MetaNode),
Empty,
}
Expand description
Represents an AST node.
Variants§
Statement(StatementNode)
Represents a statement node in the AST, such as variable = value;
.
Function(FunctionNode)
Represents a function node in the AST.
Expression(ExprKind)
Represents a literal node in the AST.
Return(ReturnNode)
Represents a return node in the AST, such as return 5
.
Meta(MetaNode)
Represents a metadata node in the AST.
Empty
This node does nothing. It should only be used for debugging purposes.
Trait Implementations§
Source§impl AstVisitable for AstKind
impl AstVisitable for AstKind
Source§impl<'de> Deserialize<'de> for AstKind
impl<'de> Deserialize<'de> for AstKind
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<AssignableKind> for AstKind
impl From<AssignableKind> for AstKind
Source§fn from(id: AssignableKind) -> Self
fn from(id: AssignableKind) -> Self
Converts to this type from the input type.
Source§impl From<AssignableKind> for Box<AstKind>
impl From<AssignableKind> for Box<AstKind>
Source§fn from(id: AssignableKind) -> Self
fn from(id: AssignableKind) -> Self
Converts to this type from the input type.
Source§impl From<BinaryOperationNode> for AstKind
impl From<BinaryOperationNode> for AstKind
Source§fn from(id: BinaryOperationNode) -> Self
fn from(id: BinaryOperationNode) -> Self
Converts to this type from the input type.
Source§impl From<BinaryOperationNode> for Box<AstKind>
impl From<BinaryOperationNode> for Box<AstKind>
Source§fn from(id: BinaryOperationNode) -> Self
fn from(id: BinaryOperationNode) -> Self
Converts to this type from the input type.
Source§impl From<FunctionCallNode> for AstKind
impl From<FunctionCallNode> for AstKind
Source§fn from(id: FunctionCallNode) -> Self
fn from(id: FunctionCallNode) -> Self
Converts to this type from the input type.
Source§impl From<FunctionCallNode> for Box<AstKind>
impl From<FunctionCallNode> for Box<AstKind>
Source§fn from(id: FunctionCallNode) -> Self
fn from(id: FunctionCallNode) -> Self
Converts to this type from the input type.
Source§impl From<FunctionNode> for AstKind
impl From<FunctionNode> for AstKind
Source§fn from(id: FunctionNode) -> Self
fn from(id: FunctionNode) -> Self
Converts to this type from the input type.
Source§impl From<FunctionNode> for Box<AstKind>
impl From<FunctionNode> for Box<AstKind>
Source§fn from(id: FunctionNode) -> Self
fn from(id: FunctionNode) -> Self
Converts to this type from the input type.
Source§impl From<IdentifierNode> for AstKind
impl From<IdentifierNode> for AstKind
Source§fn from(id: IdentifierNode) -> Self
fn from(id: IdentifierNode) -> Self
Converts to this type from the input type.
Source§impl From<IdentifierNode> for Box<AstKind>
impl From<IdentifierNode> for Box<AstKind>
Source§fn from(id: IdentifierNode) -> Self
fn from(id: IdentifierNode) -> Self
Converts to this type from the input type.
Source§impl From<LiteralNode> for AstKind
impl From<LiteralNode> for AstKind
Source§fn from(id: LiteralNode) -> Self
fn from(id: LiteralNode) -> Self
Converts to this type from the input type.
Source§impl From<LiteralNode> for Box<AstKind>
impl From<LiteralNode> for Box<AstKind>
Source§fn from(id: LiteralNode) -> Self
fn from(id: LiteralNode) -> Self
Converts to this type from the input type.
Source§impl From<MemberAccessNode> for AstKind
impl From<MemberAccessNode> for AstKind
Source§fn from(id: MemberAccessNode) -> Self
fn from(id: MemberAccessNode) -> Self
Converts to this type from the input type.
Source§impl From<MemberAccessNode> for Box<AstKind>
impl From<MemberAccessNode> for Box<AstKind>
Source§fn from(id: MemberAccessNode) -> Self
fn from(id: MemberAccessNode) -> Self
Converts to this type from the input type.
Source§impl From<ReturnNode> for AstKind
impl From<ReturnNode> for AstKind
Source§fn from(id: ReturnNode) -> Self
fn from(id: ReturnNode) -> Self
Converts to this type from the input type.
Source§impl From<ReturnNode> for Box<AstKind>
impl From<ReturnNode> for Box<AstKind>
Source§fn from(id: ReturnNode) -> Self
fn from(id: ReturnNode) -> Self
Converts to this type from the input type.
Source§impl From<StatementNode> for AstKind
impl From<StatementNode> for AstKind
Source§fn from(id: StatementNode) -> Self
fn from(id: StatementNode) -> Self
Converts to this type from the input type.
Source§impl From<StatementNode> for Box<AstKind>
impl From<StatementNode> for Box<AstKind>
Source§fn from(id: StatementNode) -> Self
fn from(id: StatementNode) -> Self
Converts to this type from the input type.
Source§impl From<UnaryOperationNode> for AstKind
impl From<UnaryOperationNode> for AstKind
Source§fn from(id: UnaryOperationNode) -> Self
fn from(id: UnaryOperationNode) -> Self
Converts to this type from the input type.
Source§impl From<UnaryOperationNode> for Box<AstKind>
impl From<UnaryOperationNode> for Box<AstKind>
Source§fn from(id: UnaryOperationNode) -> Self
fn from(id: UnaryOperationNode) -> Self
Converts to this type from the input type.
impl Eq for AstKind
impl StructuralPartialEq for AstKind
Auto Trait Implementations§
impl Freeze for AstKind
impl RefUnwindSafe for AstKind
impl Send for AstKind
impl Sync for AstKind
impl Unpin for AstKind
impl UnwindSafe for AstKind
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.