@@ -23,8 +23,8 @@ use crate::tokenizer::Span;
23
23
use super :: {
24
24
dcl:: SecondaryRoles , value:: ValueWithSpan , AccessExpr , AlterColumnOperation ,
25
25
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 ,
28
28
ConstraintCharacteristics , CopySource , CreateIndex , CreateTable , CreateTableOptions , Cte ,
29
29
Delete , DoUpdate , ExceptSelectItem , ExcludeSelectItem , Expr , ExprWithAlias , Fetch , FromTable ,
30
30
Function , FunctionArg , FunctionArgExpr , FunctionArgumentClause , FunctionArgumentList ,
@@ -779,9 +779,7 @@ impl Spanned for ConditionalStatements {
779
779
ConditionalStatements :: Sequence { statements } => {
780
780
union_spans ( statements. iter ( ) . map ( |s| s. span ( ) ) )
781
781
}
782
- ConditionalStatements :: BeginEnd ( bes) => {
783
- union_spans ( [ bes. begin_token . 0 . span , bes. end_token . 0 . span ] . into_iter ( ) )
784
- }
782
+ ConditionalStatements :: BeginEnd ( bes) => bes. span ( ) ,
785
783
}
786
784
}
787
785
}
@@ -2280,6 +2278,12 @@ impl Spanned for TableObject {
2280
2278
}
2281
2279
}
2282
2280
2281
+ impl Spanned for BeginEndStatements {
2282
+ fn span ( & self ) -> Span {
2283
+ union_spans ( [ self . begin_token . 0 . span , self . end_token . 0 . span ] . into_iter ( ) )
2284
+ }
2285
+ }
2286
+
2283
2287
#[ cfg( test) ]
2284
2288
pub mod tests {
2285
2289
use crate :: dialect:: { Dialect , GenericDialect , SnowflakeDialect } ;
0 commit comments