9.5 KiB
9.5 KiB
| title |
|---|
| Introduction |
Introduction
Tree-sitter is a parser generator tool and an incremental parsing library. It can build a concrete syntax tree for a source file and efficiently update the syntax tree as the source file is edited. Tree-sitter aims to be:
- General enough to parse any programming language
- Fast enough to parse on every keystroke in a text editor
- Robust enough to provide useful results even in the presence of syntax errors
- Dependency-free so that the runtime library (which is written in pure C) can be embedded in any application
Language Bindings
There are currently bindings that allow Tree-sitter to be used from the following languages:
- Go
- Haskell
- JavaScript (Node.js)
- JavaScript (Wasm)
- Lua
- OCaml
- Perl
- Python
- Ruby
- Ruby
- Rust
- Swift
- Kotlin
- Java
By convention, bindings are named with the language first, eg. ruby-tree-sitter.
Parsers
- Ada
- Agda
- Apex
- Bash
- Beancount
- Cap'n Proto
- C
- C++
- C#
- Clojure
- CMake
- Comment
- Common Lisp
- CSS
- CUDA
- Dart
- D
- Dockerfile
- DOT
- Elixir
- Elm
- Emacs Lisp
- Eno
- ERB / EJS
- Erlang
- Fennel
- Fish
- Formula
- Fortran
- gitattributes
- gitignore
- Gleam
- GLSL (OpenGL Shading Language)
- Go
- Go mod
- Go work
- Graphql
- Hack
- Haskell
- HCL
- HTML
- Java
- JavaScript
- jq
- JSON5
- JSON
- Julia
- Kotlin
- LALRPOP
- Latex
- Lean
- LLVM
- LLVM MachineIR
- LLVM TableGen
- Lua
- Make
- Markdown
- Markdown
- Meson
- Meson
- Motorola 68000 Assembly
- Nix
- Objective-C
- OCaml
- Org
- Pascal
- Perl
- Perl
- Perl POD
- PHP
- Portable Game Notation
- PowerShell
- Protocol Buffers
- Python
- QML
- Racket
- Rasi
- re2c
- Regex
- Rego
- reStructuredText
- R
- Ruby
- Rust
- Scala
- Scheme
- Scss
- S-expressions
- Smali
- Smali
- Sourcepawn
- SPARQL
- SQL - BigQuery
- SQL - PostgreSQL
- SQL - SQLite
- SSH
- Svelte
- Swift
- SystemRDL
- Thrift
- TOML
- Tree-sitter Query
- Turtle
- Twig
- TypeScript
- Verilog
- VHDL
- Vue
- WASM
- WGSL WebGPU Shading Language
- YAML
- YANG
- Zig
By convention, parsers are named with the language last, eg. tree-sitter-ruby.
Talks on Tree-sitter
Underlying Research
The design of Tree-sitter was greatly influenced by the following research papers: