Tree-sitter (parser generator)
In computing, Tree-sitter is a parser generator and incremental parsing library.
Details
It is used to parse source code into concrete syntax trees usable in compilers, interpreters, text editors, and static analyzers. It is specialized for use in text editors, as it supports incremental parsing for updating parse trees while code is edited in real time, and provides a built-in S-expression query system for analyzing code.
Text editors which have official integrations with Tree-sitter include Atom, GNU Emacs, Neovim, Lapce, Zed, and Helix. Language bindings allow it to be used from programming languages including Go, Haskell, Java, JavaScript (with Node.js and WASM), Kotlin, Lua, OCaml, Perl, Python, Ruby, Rust, and Swift. Tree-sitter parsers have been written for these languages and many others. GitHub uses Tree-sitter to support in-browser symbolic code navigation in Git repositories.
Tree-sitter uses a GLR parser, a type of LR parser.
Tree-sitter was originally developed by GitHub for use in the Atom text editor, where it was first released in 2018.