File tree Expand file tree Collapse file tree 3 files changed +15
-8
lines changed Expand file tree Collapse file tree 3 files changed +15
-8
lines changed Original file line number Diff line number Diff line change @@ -128,9 +128,9 @@ SQL was first standardized in 1987, and revisions of the standard have been
128128published regularly since. Most revisions have added significant new features to
129129the language, and as a result no database claims to support the full breadth of
130130features. This parser currently supports most of the SQL-92 syntax, plus some
131- syntax from newer versions that have been explicitly requested, plus some MSSQL,
132- PostgreSQL, and other dialect-specific syntax. Whenever possible, the [ online
133- SQL:2016 grammar] [ sql-2016-grammar ] is used to guide what syntax to accept.
131+ syntax from newer versions that have been explicitly requested, plus various
132+ other dialect-specific syntax. Whenever possible, the [ online SQL:2016
133+ grammar] [ sql-2016-grammar ] is used to guide what syntax to accept.
134134
135135Unfortunately, stating anything more specific about compliance is difficult.
136136There is no publicly available test suite that can assess compliance
Original file line number Diff line number Diff line change @@ -27,14 +27,18 @@ fn union_spans<I: Iterator<Item = Span>>(iter: I) -> Span {
2727
2828/// A trait for AST nodes that have a source span for use in diagnostics.
2929///
30- /// Source spans are not guaranteed to be entirely accurate. They may
31- /// be missing keywords or other tokens. Some nodes may not have a computable
32- /// span at all, in which case they return [`Span::empty()`].
30+ /// Note: Source spans are likely not currently entirely accurate. They may
31+ /// 1. Be missing keywords or other tokens.
32+ /// 2. Not have span information at all, in which case they return [`Span::empty()`].
3333///
34- /// Some impl blocks may contain doc comments with information
34+ /// See [this ticket] for more information.
35+ ///
36+ /// Note Some impl blocks may contain doc comments with information
3537/// on which nodes are missing spans.
38+ ///
39+ /// [this ticket]: https://github.com/apache/datafusion-sqlparser-rs/issues/1548
3640pub trait Spanned {
37- /// Compute the source span for this AST node, by recursively
41+ /// Return the the source [`Span`] for this AST node, by recursively
3842 /// combining the spans of its children.
3943 fn span ( & self ) -> Span ;
4044}
Original file line number Diff line number Diff line change 2525//! 1. [`Parser::parse_sql`] and [`Parser::new`] for the Parsing API
2626//! 2. [`ast`] for the AST structure
2727//! 3. [`Dialect`] for supported SQL dialects
28+ //! 4. [`Spanned`] for source text locations
29+ //!
30+ //! [`Spanned`]: ast::Spanned
2831//!
2932//! # Example parsing SQL text
3033//!
You can’t perform that action at this time.
0 commit comments