diff --git a/ast/src/lib.rs b/ast/src/lib.rs index 4055623..3489040 100644 --- a/ast/src/lib.rs +++ b/ast/src/lib.rs @@ -16,11 +16,9 @@ mod unparse; pub use builtin::*; pub use generic::*; -pub use ranged::{EmptyRange, OptionalRange, Ranged}; +pub use ranged::{EmptyRange, OptionalRange, Ranged, Suite}; pub use rustpython_parser_core::{text_size, ConversionFlag}; -pub type Suite = Vec>; - #[cfg(feature = "fold")] pub mod fold { use super::generic::*; @@ -48,4 +46,3 @@ mod optimizer; #[cfg(feature = "constant-optimization")] pub use optimizer::ConstantOptimizer; -use rustpython_parser_core::text_size::TextRange; diff --git a/ast/src/located.rs b/ast/src/located.rs index ea628bf..4987dc5 100644 --- a/ast/src/located.rs +++ b/ast/src/located.rs @@ -13,5 +13,7 @@ pub trait Located { } } +pub type Suite = Vec; + pub use crate::builtin::*; include!("gen/located.rs"); diff --git a/ast/src/ranged.rs b/ast/src/ranged.rs index d260271..14f2a43 100644 --- a/ast/src/ranged.rs +++ b/ast/src/ranged.rs @@ -3,6 +3,7 @@ use std::fmt::{Debug, Display, Formatter}; use std::marker::PhantomData; pub use crate::builtin::*; +use crate::Stmt; pub trait Ranged { fn range(&self) -> TextRange; @@ -16,6 +17,8 @@ pub trait Ranged { } } +pub type Suite = Vec>; + #[cfg(feature = "all-nodes-with-ranges")] pub type OptionalRange = R;