Skip to content

Commit 813f4a2

Browse files
ankrgylalamb
andauthored
Introduce location tracking in the tokenizer and parser (#710)
* Add locations * Add PartialEq * Add PartialEq * Add some tests * Fix rebase conflicts * Fix clippy Co-authored-by: Andrew Lamb <[email protected]>
1 parent 512a159 commit 813f4a2

File tree

4 files changed

+404
-174
lines changed

4 files changed

+404
-174
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,5 @@ Cargo.lock
1313
# IDEs
1414
.idea
1515
.vscode
16+
17+
*.swp

src/dialect/postgresql.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ pub fn parse_comment(parser: &mut Parser) -> Result<Statement, ParserError> {
5252
parser.expect_keyword(Keyword::ON)?;
5353
let token = parser.next_token();
5454

55-
let (object_type, object_name) = match token {
55+
let (object_type, object_name) = match token.token {
5656
Token::Word(w) if w.keyword == Keyword::COLUMN => {
5757
let object_name = parser.parse_object_name()?;
5858
(CommentObject::Column, object_name)

0 commit comments

Comments
 (0)