'Tree-sitter - a new parsing system for programming tools' by Max Brunsfeld

preview_player
Показать описание


Speaker: Max Brunsfeld
Рекомендации по теме
Комментарии
Автор

4 years old and still relevant, super nice !

atrevino
Автор

This is a really, really, cool idea and approach. This is going to be **phenomenally** useful and will improve how *all* code across the world is authored by everyone. I really hope this can be integrated into every editor and web-based code display. Thank you so much for this essential labour you've expended on this. I'm actually shocked at how badly most "code editors" (actually glorified text editors) understand the code they're editing. This addresses a lot of the problems of treating code as text instead of ordered trees (which is what programs really are on a conceptual *and* literal/mechanical level). I hope one day we can move into a much more productive world where most code authors can use good tree-based tools and stop wasting their time dealing with confusing parentheses, forgetting semicolons, and naming things without using spaces.

"Expand selection" was my favourite feature of Sublime that I've missed since migrating to VSCode. I love that you remember which child nodes you "expanded selection" from, so you can contract them back again without mistakenly choosing (eg) the first child! Also, that idea of using "expand selection" with multiple nodes is SO powerful and useful.

Just blown away by this, bravo and thank you again!

gloverelaxis
Автор

What a fantastic presentation. A very useful project and a great explanation of how it works!

noclaf
Автор

We've been working on a remarkably similar concept. Hot damn. Actually glad I'm not the only one.

PatrickKellyLoneCoder
Автор

Just want to add another comment about how great a presentation this was.

douglasmennella
Автор

tree-sitter is now part of GNU Emacs:)

astrosticks
Автор

Absolutely amazing presentation (and software)

satishgoda
Автор

So informative and the idea is just mind-blowing! Thanks for your well organized presentations.

zwuqrjm
Автор

Awesome job—both the tree-sitter work and the presentation. Thank you! Just stumbled across this via a pointer on the emacs-devel list (in case anyone wonders :-). The one small thing I have an issue with was the critique of existing code-highlighting practices in the "motivation" part of the talk. In some cases I personally liked the "old-style" highlighting better than the treesitter-generated ones; in particular, I have a preference for NAMES OF NEWLY DEFINED THINGS to be highlighted, and that was what the "old" style did in the examples. In fact I think that EVEN OLDER algorithms did it the way Max prefers, i.e. type names one color, variable names second color, etc.
Anyway, that's a detail. This is REALLY COOL work with lots of potential. Also kudos for respecting the elderly (-: as shown here, old methods such as (G)LR parsing may still have untapped potential. Now excuse me while I get a case of fresh punch cards from the basement and try to write a tree-sitter grammar for LISP

SimonLeinen
Автор

Wow, this is crazy cool. Might have to give Atom a try after seeing this

_ashout
Автор

You know vscode right now is so popular but I still love and use Atom as my primary editor. I hope now that Microsoft owns Github and Atom they dont get rid of it in favor of vscode. Also, I didn't know about this but the syntax highlighting always did look better to me in Atom but I just assumed the themes were made better, I didn't realize all this tech was going on under the hood

tompov
Автор

This is basically getting default features of structural (aka projectional) editing into textual editing. Interesting.

MrRobWalter
Автор

Slick! Leveraging GLR for error recovery is a great idea. Question, though: How would you handle a confused lexer? Consider the insertion of a quote mark near the beginning of a file...

IanKjos
Автор

Looks interesting. Reminds me of Roslyn for C# in Visual Studio.

kaerafeliceoira-turner
Автор

This guy is now co-founder behind the new fast code editor Zed. Go figure!

dl
Автор

Now Treesitter has given Neovim superpowers by allowing it understand ASTs

melodyogonna
Автор

Thanks for your presentation. I am learning tree-sitter but i have a problem. I am parsing a source code from file, i need to know his function name not the node name. how can i do that. I read all the doc but i can't have the solution. thanks

tretretretre
Автор

I'm not convinced.
For auto-completion and error reporting, language servers already need to parse and analyze the code.
I'd expect that to be much more efficient if information for syntax highlighting also comes from that same parser and analyzer.
I'm not much into language server protocol but I got the impression that semantic highlighting is something that is already supported (even though not implemented for every language)
LSP is also designed for incremental changes as far as I know.

gzoechi