@@ -23,8 +23,8 @@ use crate::tokenizer::Span;
2323use super :: {
2424 dcl:: SecondaryRoles , value:: ValueWithSpan , AccessExpr , AlterColumnOperation ,
2525 AlterIndexOperation , AlterTableOperation , Array , Assignment , AssignmentTarget , AttachedToken ,
26- CaseStatement , CloseCursor , ClusteredIndex , ColumnDef , ColumnOption , ColumnOptionDef ,
27- ConditionalStatementBlock , ConditionalStatements , ConflictTarget , ConnectBy ,
26+ BeginEndStatements , CaseStatement , CloseCursor , ClusteredIndex , ColumnDef , ColumnOption ,
27+ ColumnOptionDef , ConditionalStatementBlock , ConditionalStatements , ConflictTarget , ConnectBy ,
2828 ConstraintCharacteristics , CopySource , CreateIndex , CreateTable , CreateTableOptions , Cte ,
2929 Delete , DoUpdate , ExceptSelectItem , ExcludeSelectItem , Expr , ExprWithAlias , Fetch , FromTable ,
3030 Function , FunctionArg , FunctionArgExpr , FunctionArgumentClause , FunctionArgumentList ,
@@ -778,9 +778,7 @@ impl Spanned for ConditionalStatements {
778778 ConditionalStatements :: Sequence { statements } => {
779779 union_spans ( statements. iter ( ) . map ( |s| s. span ( ) ) )
780780 }
781- ConditionalStatements :: BeginEnd ( bes) => {
782- union_spans ( [ bes. begin_token . 0 . span , bes. end_token . 0 . span ] . into_iter ( ) )
783- }
781+ ConditionalStatements :: BeginEnd ( bes) => bes. span ( ) ,
784782 }
785783 }
786784}
@@ -2279,6 +2277,12 @@ impl Spanned for TableObject {
22792277 }
22802278}
22812279
2280+ impl Spanned for BeginEndStatements {
2281+ fn span ( & self ) -> Span {
2282+ union_spans ( [ self . begin_token . 0 . span , self . end_token . 0 . span ] . into_iter ( ) )
2283+ }
2284+ }
2285+
22822286#[ cfg( test) ]
22832287pub mod tests {
22842288 use crate :: dialect:: { Dialect , GenericDialect , SnowflakeDialect } ;
0 commit comments