Tree-sitter - a new parsing system for programming tools
summary
Tree-sitter is a C library with language bindings that provides a uniform C API, fast incremental parsing and robust error recovery for real-time editor use. Parsers are generated from JS grammars into standalone C code; the runtime reuses unchanged subtrees so edits cost only local work — a 600 KB React build parses in about 54 milliseconds. Integration enables accurate syntax highlighting, syntax-aware folding, extend-selection and a GitHub.com file-changes function list — all demonstrated working in Atom and on github.com.
AI-written summary · about
chapters (11)
- 0:00Introduction
- 0:50What is Treesitter
- 6:07Syntax Highlighting
- 12:28Code Folding
- 15:51Extend Selection
- 19:31How Treesitter works
- 22:28Algorithms
- 24:05LR parsing
- 26:38Is LR parsing good for all languages
- 29:27GLR parsing
- 34:36Incremental parsing
related talks
29mSyntax Tree
29mMy Little Parser: Tooling is Magic
29mAST: the Secret Weapon to Transform a Codebase
31mAdvanced JavaScript code search: Abstract Syntax Tree analysis
16mVisual statical analysis tool
27mParsing, Compiling, and Static Metaprogramming
46mWhat even is code? Building a non-code coding interface
25mText files full of punctuation? There must be a better way to code.
