All Projects → m-novikov → tree-sitter-sql

m-novikov / tree-sitter-sql

Licence: MIT License
SQL syntax highlighting for tree-sitter

Programming Languages

javascript
184084 projects - #8 most used programming language
rust
11053 projects
scheme
763 projects
C++
36643 projects - #6 most used programming language
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to tree-sitter-sql

Nord Visual Studio Code
An arctic, north-bluish clean and elegant Visual Studio Code theme.
Stars: ✭ 749 (+2169.7%)
Mutual labels:  syntax-highlighting, syntax
Nord Sublime Text
An arctic, north-bluish clean and elegant Sublime Text theme.
Stars: ✭ 109 (+230.3%)
Mutual labels:  syntax-highlighting, syntax
Catage
Node package and CLI tool to convert code into an image with syntax highlighting
Stars: ✭ 44 (+33.33%)
Mutual labels:  syntax-highlighting, syntax
Nord
An arctic, north-bluish color palette.
Stars: ✭ 4,816 (+14493.94%)
Mutual labels:  syntax-highlighting, syntax
language-rainmeter
Syntax highlighting for Rainmeter files in Atom.
Stars: ✭ 19 (-42.42%)
Mutual labels:  syntax-highlighting, syntax
Code Surfer
Rad code slides <🏄/>
Stars: ✭ 5,477 (+16496.97%)
Mutual labels:  syntax-highlighting, syntax
splash
🌊 Highlight source code embedded in HTML with a splash of color
Stars: ✭ 19 (-42.42%)
Mutual labels:  syntax-highlighting, syntax
see-cli
A colorful 🌈 cat - syntax highlight print CLI
Stars: ✭ 24 (-27.27%)
Mutual labels:  syntax-highlighting, syntax
nord-atom-syntax
An arctic, north-bluish clean and elegant Atom syntax theme.
Stars: ✭ 72 (+118.18%)
Mutual labels:  syntax-highlighting, syntax
syntax highlighter
Syntax Highlighter for Dart/Flutter Code
Stars: ✭ 28 (-15.15%)
Mutual labels:  syntax-highlighting, syntax
Lowlight
Virtual syntax highlighting for virtual DOMs and non-HTML things
Stars: ✭ 310 (+839.39%)
Mutual labels:  syntax-highlighting, syntax
KodeEditor
A simple code editor with syntax highlighting and pinch to zoom
Stars: ✭ 60 (+81.82%)
Mutual labels:  syntax-highlighting, syntax
Nord Jetbrains
An arctic, north-bluish clean and elegant JetBrains IDE UI and editor color theme.
Stars: ✭ 293 (+787.88%)
Mutual labels:  syntax-highlighting, syntax
Sublime Markdown Extended
Top 100 Sublime Text plugin! Markdown syntax highlighter for Sublime Text, with extended support for GFM fenced code blocks, with language-specific syntax highlighting. YAML Front Matter. Works with ST2/ST3. Goes great with Assemble.
Stars: ✭ 645 (+1854.55%)
Mutual labels:  syntax-highlighting, syntax
Refractor
Lightweight, robust, elegant virtual syntax highlighting using Prism
Stars: ✭ 291 (+781.82%)
Mutual labels:  syntax-highlighting, syntax
Syntax Highlighter
Syntax Highlighter extension for Visual Studio Code (VSCode). Based on Tree-sitter.
Stars: ✭ 88 (+166.67%)
Mutual labels:  syntax-highlighting, syntax
nord-notepadplusplus
An arctic, north-bluish clean and elegant Notepad++ theme.
Stars: ✭ 112 (+239.39%)
Mutual labels:  syntax-highlighting, syntax
vscode-liquid
💧Liquid language support for VS Code
Stars: ✭ 137 (+315.15%)
Mutual labels:  syntax-highlighting, syntax
fastedit
安卓端高性能输入框。
Stars: ✭ 38 (+15.15%)
Mutual labels:  syntax-highlighting, syntax
coAST
Universal and language-independent abstract syntax tree
Stars: ✭ 30 (-9.09%)
Mutual labels:  syntax

Node.js CI

SQL syntax for tree-sitter

This project initially focuses on PostgreSQL flavor of SQL

Try it out

You can try out the parser here: Tree Sitter SQL Playground

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

Goals

This parser is supposed to be used in text editors. As a result:

  • it's very lax in what it considers valid SQL parse
  • adding extra nodes to have convenient selection anchors is okay

Other projects

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].