Tree-sitter: a new parsing system for programming tools - GitHub Universe 2017
GitHub2 HN recommenders · recommended in 2 months, 2018–2022
talk · intermediate · evergreen · 2018–2022 on HN
Max Brunsfeld of GitHub presents Tree-sitter, a parsing system for programming tools that supports incremental, error-tolerant parsing. He demos its integration into GitHub.com and Atom for syntax highlighting and code navigation.
Recommended as the canonical introduction to tree-sitter and why fast incremental parsing enables live editor support.
Up next
2 mo on HNReact Helsinki February 2020
Fraktio
2 HN recommender · 2021–2025
7 mo on HNConflict Resolution for Eventual Consistency • Martin Kleppmann • GOTO 2016
GOTO Conferences
3 HN recommender · 2017–2020
6 mo on HNIn Search of Tomorrow
Berkeley Institute for Data Science (BIDS)
9 HN recommender · 2015–2018
7 mo on HNBottom Up vs Top Down Design in Clojure - Mark Bastian
ClojureTV
5 HN recommender · 2016–2021
13 mo on HNRich Harris - Rethinking reactivity
You Gotta Love Frontend
15 HN recommender · 2019–2026
12 mo on HNLexical Scanning in Go - Rob Pike
GoogleFOSSSydney
13 HN recommender · 2012–2025
12 mo on HNWilliam Byrd on "The Most Beautiful Program Ever Written" [PWL NYC]
PapersWeLove
11 HN recommender · 2017–2026
10 mo on HNCppCon 2016: Jason Turner “Rich Code for Tiny Computers: A Simple Commodore 64 Game in C++17”
CppCon
13 HN recommender · 2016–2024
8 mo on HNClasp: Common Lisp using LLVM and C++ for Molecular Metaprogramming
Google TechTalks
8 HN recommender · 2015–2024
7 mo on HNCompiling C to printable x86, to make an executable research paper
suckerpinch
8 HN recommender · 2018–2023
7 mo on HNBreak Me00 The MoVfuscator Turning mov into a soul crushing RE nightmare Christopher Domas
Adrian Crenshaw
6 HN recommender · 2017–2026
7 mo on HNA Talk Near the Future of Python (a.k.a., Dave live-codes a WebAssembly Interpreter)
David Beazley
7 HN recommender · 2019–2025
4 comments from Hacker News
They use tree-sitter link It's ok with errors in AST and just marks such nodes as invalid. There is a long (42 minutes) but worth to watch talk about tree-sitter ▶ this video Or the shorter version (20 minutes) link
Tree-sitter is not just for code folding, it's a full-on incremental parser that's fast enough to run on every keystroke. See their expand selection example for another really compelling use-case. If you're interested in more details, there's also this talk from the developer behind tree-sitter ( ▶ this video ), where he showcases how they could use tree-sitter to quickly parse entire multi-megabyte minified JS files to provide complete syntax highlighting for them that updates as you edit, and how the accuracy and usefulness of the actual syntax highlighting can improve over regex based implementations due to having access to the fully specified grammar of the language. I think tree-sitter is also a game changer for extension development once it stabilizes and the APIs are opened up. Extensions like swackets will no longer have arbitrary performance constraints that break user experience ( link ), and it opens the door to a whole new set of intelligent extensions that understand the languages you write at a much deeper level that were previously unfeasible due to parsing performance, or required some external heavy-weight language server.
`tree-sitter` has been post to the website a bunch of times so I remembered from those submissions: link Also these resources: link ▶ this video
100% agree. If starting now I think you should consider targeting mlir[1]. It fixes many problems you will have with llvm, and allows you to create language specific dialects and transformations. Impressive new work by a top-notch team led by LLVM creator Chris Lattner. It has LLVM as an optional target, so you get that for free. For a parser, you should consider using tree-sitter[2]. Tree-sitter gives you live editor support for free. Impressive work by Max Brunsfeld. [1] link [2] ▶ this video