@@ -21,21 +21,21 @@ use core::iter;
2121use crate :: tokenizer:: Span ;
2222
2323use super :: {
24- dcl:: SecondaryRoles , AccessExpr , AlterColumnOperation , AlterIndexOperation ,
25- AlterTableOperation , Array , Assignment , AssignmentTarget , CloseCursor , ClusteredIndex ,
26- ColumnDef , ColumnOption , ColumnOptionDef , ConflictTarget , ConnectBy , ConstraintCharacteristics ,
27- CopySource , CreateIndex , CreateTable , CreateTableOptions , Cte , Delete , DoUpdate ,
28- ExceptSelectItem , ExcludeSelectItem , Expr , ExprWithAlias , Fetch , FromTable , Function ,
29- FunctionArg , FunctionArgExpr , FunctionArgumentClause , FunctionArgumentList , FunctionArguments ,
30- GroupByExpr , HavingBound , IlikeSelectItem , Insert , Interpolate , InterpolateExpr , Join ,
31- JoinConstraint , JoinOperator , JsonPath , JsonPathElem , LateralView , MatchRecognizePattern ,
32- Measure , NamedWindowDefinition , ObjectName , ObjectNamePart , Offset , OnConflict ,
33- OnConflictAction , OnInsert , OrderBy , OrderByExpr , OrderByKind , Partition , PivotValueSource ,
34- ProjectionSelect , Query , ReferentialAction , RenameSelectItem , ReplaceSelectElement ,
35- ReplaceSelectItem , Select , SelectInto , SelectItem , SetExpr , SqlOption , Statement , Subscript ,
36- SymbolDefinition , TableAlias , TableAliasColumnDef , TableConstraint , TableFactor , TableObject ,
37- TableOptionsClustered , TableWithJoins , UpdateTableFromKind , Use , Value , Values , ViewColumnDef ,
38- WildcardAdditionalOptions , With , WithFill ,
24+ dcl:: SecondaryRoles , value :: ValueWithSpan , AccessExpr , AlterColumnOperation ,
25+ AlterIndexOperation , AlterTableOperation , Array , Assignment , AssignmentTarget , CloseCursor ,
26+ ClusteredIndex , ColumnDef , ColumnOption , ColumnOptionDef , ConflictTarget , ConnectBy ,
27+ ConstraintCharacteristics , CopySource , CreateIndex , CreateTable , CreateTableOptions , Cte ,
28+ Delete , DoUpdate , ExceptSelectItem , ExcludeSelectItem , Expr , ExprWithAlias , Fetch , FromTable ,
29+ Function , FunctionArg , FunctionArgExpr , FunctionArgumentClause , FunctionArgumentList ,
30+ FunctionArguments , GroupByExpr , HavingBound , IlikeSelectItem , Insert , Interpolate ,
31+ InterpolateExpr , Join , JoinConstraint , JoinOperator , JsonPath , JsonPathElem , LateralView ,
32+ MatchRecognizePattern , Measure , NamedWindowDefinition , ObjectName , ObjectNamePart , Offset ,
33+ OnConflict , OnConflictAction , OnInsert , OrderBy , OrderByExpr , OrderByKind , Partition ,
34+ PivotValueSource , ProjectionSelect , Query , ReferentialAction , RenameSelectItem ,
35+ ReplaceSelectElement , ReplaceSelectItem , Select , SelectInto , SelectItem , SetExpr , SqlOption ,
36+ Statement , Subscript , SymbolDefinition , TableAlias , TableAliasColumnDef , TableConstraint ,
37+ TableFactor , TableObject , TableOptionsClustered , TableWithJoins , UpdateTableFromKind , Use ,
38+ Value , Values , ViewColumnDef , WildcardAdditionalOptions , With , WithFill ,
3939} ;
4040
4141/// Given an iterator of spans, return the [Span::union] of all spans.
@@ -1983,10 +1983,13 @@ impl Spanned for TableAliasColumnDef {
19831983 }
19841984}
19851985
1986- /// # missing span
1987- ///
1988- /// The span of a `Value` is currently not implemented, as doing so
1989- /// requires a breaking changes, which may be done in a future release.
1986+ impl Spanned for ValueWithSpan {
1987+ fn span ( & self ) -> Span {
1988+ self . span
1989+ }
1990+ }
1991+
1992+ /// The span is stored in the `ValueWrapper` struct
19901993impl Spanned for Value {
19911994 fn span ( & self ) -> Span {
19921995 Span :: empty ( ) // # todo: Value needs to store spans before this is possible
0 commit comments