tree-sitter-sql

Crates.iotree-sitter-sql
lib.rstree-sitter-sql
version0.0.2
sourcesrc
created_at2021-06-05 13:39:24.890953
updated_at2021-06-05 13:54:33.861927
descriptionSQL grammar for the tree-sitter parsing library
homepage
repositoryhttps://github.com/m-novikov/tree-sitter-sql
max_upload_size
id406480
size463,819
Maksim Novikov (m-novikov)

documentation

README

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
Commit count: 200

cargo fmt