You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: crates/parser/src/lib.rs
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -3,17 +3,17 @@
3
3
//! This crate provides a parser for the Postgres SQL dialect.
4
4
//! It is based in the pg_query.rs crate, which is a wrapper around the PostgreSQL query parser.
5
5
//! The main `Parser` struct parses a source file and individual statements.
6
-
//! The `Parse` struct contains the resulting concrete syntax tree, syntax errors, and the abtract syntax tree, which is a list of pg_query statements and their positions.
6
+
//! The `Parse` result struct contains the resulting concrete syntax tree, syntax errors, and the abtract syntax tree, which is a list of pg_query statements and their positions.
7
7
//!
8
8
//! The idea is to offload the heavy lifting to the same parser that the PostgreSQL server uses,
9
-
//! and just fill in the gaps to be able to build both cst and ast from a a source file that
9
+
//! and just fill in the gaps to be able to build both cst and ast from a source file that
10
10
//! potentially contains erroneous statements.
11
11
//!
12
12
//! The main drawbacks of the PostgreSQL query parser mitigated by this parser are:
13
13
//! - it only parsed a full source text, and if there is any syntax error in a file, it will not parse anything and return an error.
14
-
//! - it does not parse whitespaces and newlines, so it is not possible to build a concrete syntax tree build a concrete syntax tree.
14
+
//! - it does not parse whitespaces and newlines, and it only returns ast nodes. The concrete syntax tree has to be reverse-engineered.
15
15
//!
16
-
//! To see how these drawbacks are mitigated, see the `statement.rs` and the `source_file.rs` module.
16
+
//! To see how these drawbacks are mitigated, see the `statement_parser.rs` and the `source_parser.rs` module.
0 commit comments