use crate::ns::*; use serde::{Serialize, Deserialize}; #[derive(Clone, Serialize, Deserialize)] pub struct ForStatement { pub location: Location, pub init: Option, pub test: Option>, pub update: Option>, pub body: Rc, } #[derive(Clone, Serialize, Deserialize)] pub enum ForInitializer { Expression(Rc), VariableDefinition(Rc), } #[derive(Clone, Serialize, Deserialize)] pub struct ForInStatement { pub location: Location, pub each: bool, pub left: ForInBinding, pub right: Rc, pub body: Rc, } #[derive(Clone, Serialize, Deserialize)] pub enum ForInBinding { Expression(Rc), VariableDefinition(Rc), }