@@ -32,11 +32,11 @@ use super::{
3232 JoinOperator , JsonPath , JsonPathElem , LateralView , LimitClause , MatchRecognizePattern , Measure ,
3333 NamedWindowDefinition , ObjectName , ObjectNamePart , Offset , OnConflict , OnConflictAction ,
3434 OnInsert , OrderBy , OrderByExpr , OrderByKind , Partition , PivotValueSource , ProjectionSelect ,
35- Query , ReferentialAction , RenameSelectItem , ReplaceSelectElement , ReplaceSelectItem , Select ,
36- SelectInto , SelectItem , SetExpr , SqlOption , Statement , Subscript , SymbolDefinition , TableAlias ,
37- TableAliasColumnDef , TableConstraint , TableFactor , TableObject , TableOptionsClustered ,
38- TableWithJoins , UpdateTableFromKind , Use , Value , Values , ViewColumnDef ,
39- WildcardAdditionalOptions , With , WithFill ,
35+ Query , RaiseStatement , RaiseStatementValue , ReferentialAction , RenameSelectItem ,
36+ ReplaceSelectElement , ReplaceSelectItem , Select , SelectInto , SelectItem , SetExpr , SqlOption ,
37+ Statement , Subscript , SymbolDefinition , TableAlias , TableAliasColumnDef , TableConstraint ,
38+ TableFactor , TableObject , TableOptionsClustered , TableWithJoins , UpdateTableFromKind , Use ,
39+ Value , Values , ViewColumnDef , WildcardAdditionalOptions , With , WithFill ,
4040} ;
4141
4242/// Given an iterator of spans, return the [Span::union] of all spans.
@@ -337,6 +337,7 @@ impl Spanned for Statement {
337337 } => source. span ( ) ,
338338 Statement :: Case ( stmt) => stmt. span ( ) ,
339339 Statement :: If ( stmt) => stmt. span ( ) ,
340+ Statement :: Raise ( stmt) => stmt. span ( ) ,
340341 Statement :: Call ( function) => function. span ( ) ,
341342 Statement :: Copy {
342343 source,
@@ -782,6 +783,23 @@ impl Spanned for ConditionalStatements {
782783 }
783784}
784785
786+ impl Spanned for RaiseStatement {
787+ fn span ( & self ) -> Span {
788+ let RaiseStatement { value } = self ;
789+
790+ union_spans ( value. iter ( ) . map ( |value| value. span ( ) ) )
791+ }
792+ }
793+
794+ impl Spanned for RaiseStatementValue {
795+ fn span ( & self ) -> Span {
796+ match self {
797+ RaiseStatementValue :: UsingMessage ( expr) => expr. span ( ) ,
798+ RaiseStatementValue :: Expr ( expr) => expr. span ( ) ,
799+ }
800+ }
801+ }
802+
785803/// # partial span
786804///
787805/// Missing spans:
0 commit comments