Skip to content

Commit

Permalink
Introduce location tracking in the tokenizer and parser (#710)
Browse files Browse the repository at this point in the history
* Add locations

* Add PartialEq

* Add PartialEq

* Add some tests

* Fix rebase conflicts

* Fix clippy

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
  • Loading branch information
ankrgyl and alamb committed Dec 5, 2022
1 parent 512a159 commit 813f4a2
Show file tree
Hide file tree
Showing 4 changed files with 404 additions and 174 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -13,3 +13,5 @@ Cargo.lock
# IDEs
.idea
.vscode

*.swp
2 changes: 1 addition & 1 deletion src/dialect/postgresql.rs
Expand Up @@ -52,7 +52,7 @@ pub fn parse_comment(parser: &mut Parser) -> Result<Statement, ParserError> {
parser.expect_keyword(Keyword::ON)?;
let token = parser.next_token();

let (object_type, object_name) = match token {
let (object_type, object_name) = match token.token {
Token::Word(w) if w.keyword == Keyword::COLUMN => {
let object_name = parser.parse_object_name()?;
(CommentObject::Column, object_name)
Expand Down

0 comments on commit 813f4a2

Please sign in to comment.