-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
parser+lev+types: suggestions if unknown keyword found:
If an identifier is found in place where a keyword should be (for example at the start of a statement), the diagnostic now displays 3 suggestions similar suggestions, by using the levenshtein distance to all known keywords: =========================== example/stmt.sql =========================== error[UnknownKeyword]: Unknown Keyword -> /home/teo/programming/sqleibniz/example/stmt.sql:65:1 63 | -- https://www.sqlite.org/lang_view.html 64 | DROP VIEW view_name; 65 | SELET VIEW IF EXISTS schema_name.view_name; | ^^^^^ error occurs here. | ~ note: 'SELET' is not a know keyword, did you mean: - SELECT - SET - LEFT * UnknownKeyword: Source file contains an unknown keyword =============================== Summary ================================ [-] example/stmt.sql: 1 Error(s) detected 0 Error(s) ignored => 0/1 Files verified successfully, 1 verification failed.
- Loading branch information
Showing
4 changed files
with
199 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters