use serde::{Deserialize, Serialize}; use tree_sitter::Node; use crate::{ AbstractTree, Assignment, Async, Error, Expression, Filter, Find, For, IfElse, Insert, Map, Match, Remove, Result, Select, Transform, Value, While, }; /// Abstract representation of a statement. /// /// A statement may evaluate to an Empty value when run. If a Statement is an /// Expression, it will always return a non-empty value when run. #[derive(Debug, Clone, Serialize, Deserialize, Eq, PartialEq, PartialOrd, Ord)] pub enum Statement { Comment(String), Assignment(Box), Expression(Expression), IfElse(Box), Match(Match), While(Box), Async(Box), For(Box), Transform(Box), Filter(Box), Find(Box), Remove(Box), Select(Box