Tree-sitter: a new parsing system for programming tools - GitHub Universe 2017
GitHub2 HN recommenders · 2018–2022
24K views · talk · evergreen · Uploaded 2017-12-20
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.
38:47RailsConf 2014 - All the Little Things by Sandi Metz
Confreaks
36:45Rich Harris - Rethinking reactivity
You Gotta Love Frontend
51:18Lexical Scanning in Go - Rob Pike
GoogleFOSSSydney
1:31:06William Byrd on "The Most Beautiful Program Ever Written" [PWL NYC]
PapersWeLove
40:20"Testing Distributed Systems w/ Deterministic Simulation" by Will Wilson
Strange Loop Conference
1:03:55🚀 TDD, Where Did It All Go Wrong (Ian Cooper)
DevTernity Conference
54:20Bret Victor - Inventing on Principle
Rui Oliveira
1:02:26Solving Problems the Clojure Way - Rafal Dittwald
Clojure/north
4 comments from Hacker News
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 ( [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.
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] [VIDEO]
`tree-sitter` has been post to the website a bunch of times so I remembered from those submissions: [LINK] Also these resources: [LINK] [VIDEO]
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 [VIDEO] Or the shorter version (20 minutes) [LINK]