@@ -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.
@@ -1978,10 +1978,13 @@ impl Spanned for TableAliasColumnDef {
19781978 }
19791979}
19801980
1981- /// # missing span
1982- ///
1983- /// The span of a `Value` is currently not implemented, as doing so
1984- /// requires a breaking changes, which may be done in a future release.
1981+ impl Spanned for ValueWithSpan {
1982+ fn span ( & self ) -> Span {
1983+ self . span
1984+ }
1985+ }
1986+
1987+ /// The span is stored in the `ValueWrapper` struct
19851988impl Spanned for Value {
19861989 fn span ( & self ) -> Span {
19871990 Span :: empty ( ) // # todo: Value needs to store spans before this is possible
0 commit comments