a structural diff that understands syntax 🟥🟩
 
 
 
 
 
Go to file
Maksim Novikov da93f8aa68
Add update-playground command
2021-07-03 13:20:28 +07:00
.github/workflows Fix workflow 2021-06-05 15:51:38 +07:00
bindings Fix name in rust bindings 2021-06-05 15:43:12 +07:00
docs Add playground 2021-06-30 20:07:43 +07:00
examples Add select subexpressions 2021-06-19 18:19:43 +07:00
queries Add initial function body parsing 2021-06-06 15:47:18 +07:00
scripts Update prettier config 2021-06-05 15:32:23 +07:00
src Add select subexpressions 2021-06-19 18:19:43 +07:00
test Add select subexpressions 2021-06-19 18:19:43 +07:00
.editorconfig Add playground 2021-06-30 20:07:43 +07:00
.gitattributes Ignore generated code in github stats 2021-06-04 19:57:45 +07:00
.gitignore Add update-playground command 2021-07-03 13:20:28 +07:00
.prettierignore Install prettier 2021-05-30 16:21:35 +07:00
.prettierrc.json Update prettier config 2021-06-05 15:32:23 +07:00
Cargo.lock Update Cargo.lock 2021-06-06 13:42:31 +07:00
Cargo.toml Bump cargo version 2021-06-05 15:54:23 +07:00
LICENSE Add readme license 2021-05-30 15:11:55 +07:00
README.md Add extract-error command for debugging 2021-05-30 17:43:13 +07:00
binding.gyp intial commit 2021-05-28 18:45:01 +07:00
grammar.js Add select subexpressions 2021-06-19 18:19:43 +07:00
package-lock.json Add from clause 2021-06-05 11:12:29 +07:00
package.json Add update-playground command 2021-07-03 13:20:28 +07:00

README.md

Node.js CI

SQL syntax for tree-sitter

This project initially focuses on PostgreSQL flavor of SQL

Development

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

Running tests

npm install --also=dev
npm test

Debbuging

  • npm run parse <file.sql> outputs a syntax tree
  • npm run extract-error <file.sql> shows first offending line