Skip to content
0:00 / 0:00

#tree-sitter#parsing#ast

Tree-sitter: a new parsing system for programming tools - GitHub Universe 2017

GitHub

704K subscribers • 6 videos on Hallway

YouTube
  • Recommended by 2 people: 2 on Hacker News.
  • A classic. People kept recommending it from 2018 to 2022.
  • Presented by Max Brunsfeld, GitHub

Intermediate. Assumes working knowledge.

23K views8 years ago2 recommendations

Systems programmingTools and practiceCompilers and interpretersVim, Emacs and editors

Max Brunsfeld introduces Tree-sitter, an incremental, error-tolerant parsing system designed for real-time code analysis in editors and tools.

Presented by Max Brunsfeld, GitHub. Developer tools that support multiple languages generally have very limited regex-based code-analysis capabilities. Tree-sitter is a new parsing system that aims to change this paradigm. We're in the process of integrating Tree-sitter into both GitHub.com and Atom, which will allow us to analyze code accurately and in real-time, paving the way for better syntax highlighting, code navigation, and refactoring support. We'll demo some new features that Tree-sitter has enabled in GitHub.com and Atom, discuss its implementation, and share thoughts on ways it could be used in the future. About GitHub Universe: GitHub Universe is a two-day conference dedicated to the creativity and curiosity of the largest software community in the world. Sessions cover topics from team culture to open source software across industries and technologies. For more information on GitHub Universe, check the website: githubuniverse.com

Why it's here

2 people recommend this

What people say. Recommended as an excellent introduction to Tree-sitter and how incremental parsing works in modern editors.

lewisl9029on Hacker News • Recommends

On “Atom 1.25”

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 ( link to 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 al…

ris58hon Hacker News • Recommends

On “Zas Editor”

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 link to this video Or the shorter version (20 minutes) link

imoldfellaon Hacker News • Mentions

On “A Brief and Brisk Overview of Compiler Architecture”

100% agree. If starting now I think you should consider targeting mlir1. 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-sitter2. Tree-sitter gives you live editor support for free. Impressive work by Max Brunsfeld. 1 link 2 link to this video

bhlon Hacker News • Mentions

On “Diffsitter: A tree-sitter based AST difftool to get meaningful semantic diffs”

`tree-sitter` has been post to the website a bunch of times so I remembered from those submissions: link Also these resources: link link to this video