Crates.io | devgen-tree-sitter-sql |
lib.rs | devgen-tree-sitter-sql |
version | |
source | src |
created_at | 2024-11-18 10:04:08.930732 |
updated_at | 2024-11-18 10:04:08.930732 |
description | SQL grammar for the tree-sitter parsing library |
homepage | |
repository | https://github.com/m-novikov/tree-sitter-sql |
max_upload_size | |
id | 1452058 |
Cargo.toml error: | TOML parse error at line 24, column 1 | 24 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
This project initially focuses on PostgreSQL flavor of SQL
You can try out the parser here: Tree Sitter SQL Playground
Install pre-commit and run pre-commit install
in the root of this repo. This will ensure
that code follows code style of this repo.
File describing grammar is grammar.js
Every time the grammar file changes code generation needs to be run by invoking npm run gen
npm test
command automatically performs code generation
Tests files are located in test/corpus
Here is the documentation on test file syntax
npm install --also=dev
npm test
npm run parse <file.sql>
outputs a syntax treenpm run extract-error <file.sql>
shows first offending lineThis parser is supposed to be used in text editors. As a result: