Very impressive! Some questions: 1. Can it handle multiple files in a project? Per-file compile flags? 2. Can it handle function overloads? Inherited methods? 3. Can it handle C++ templates? This should be pretty hard because C++ templates are not context-free. 4. Can it do jump-to-implementation?
This could be a very cool tool to implement refactoring algorithms. However, there is a fundamental problem with C code -- preprocessor. That would be nice to have a callback in the tokenizer (?) which looks up expanded macros and reuse them to parse the source but keep track of original source code locations
Even more with Rust that has a preprocessor which works on tokenized trees (something between lexical analysis and AST) and you can write preprocessor logic in Rust itself.
I happened to come across this thing. I wonder how lexer/parser is generated. Where do I look for basic things? Table of content: 2:04 Rationale behind creation of Tree-sitter 10:05 What're we doing with Tree-sitter 22:04 How it works
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
Looks like a tool that could be leverages for transpiling too... C to javascript or vice versa.... impressive though even just for syntax highlighting actually getting syntax instead of just keyword and string matches.
yeah, after stumbling upon tree-sitter, i'm immediately planning to use it for the canonical parser for my alt-js language that i prototyped a few years ago, and havent worked on since (so the parser is woefully out of date, as the language is meant to keep up to date with modern js)
So nice it makes you wonder why something like this hasn't existed up until now.
I think many people had something like this in mind.... but didn't get their ass up!
This guy did it!
Pig@@smallsnippets
Sir, what you did at 13:30 was amazing. It shows the difference between fake and real parsing. It deserves an applause 👏
VScode would become even more great if it just implement Tree-sitter for text grammar.
still waiting for this
emacs has it
@@elrisitas8508 neovim
@@mndtr0 neomeme
@@elrisitas8508 ?
Very impressive! Some questions:
1. Can it handle multiple files in a project? Per-file compile flags?
2. Can it handle function overloads? Inherited methods?
3. Can it handle C++ templates? This should be pretty hard because C++ templates are not context-free.
4. Can it do jump-to-implementation?
This could be a very cool tool to implement refactoring algorithms. However, there is a fundamental problem with C code -- preprocessor. That would be nice to have a callback in the tokenizer (?) which looks up expanded macros and reuse them to parse the source but keep track of original source code locations
Even more with Rust that has a preprocessor which works on tokenized trees (something between lexical analysis and AST) and you can write preprocessor logic in Rust itself.
I happened to come across this thing. I wonder how lexer/parser is generated. Where do I look for basic things?
Table of content:
2:04 Rationale behind creation of Tree-sitter
10:05 What're we doing with Tree-sitter
22:04 How it works
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
Looks like a tool that could be leverages for transpiling too... C to javascript or vice versa....
impressive though even just for syntax highlighting actually getting syntax instead of just keyword and string matches.
yeah, after stumbling upon tree-sitter, i'm immediately planning to use it for the canonical parser for my alt-js language that i prototyped a few years ago, and havent worked on since (so the parser is woefully out of date, as the language is meant to keep up to date with modern js)
So clear, thank you!
Will Tree-Sitter make it easier for package developers to create packages for truly recognizing syntax errors within a language?
I think it just came true after 2 years.
Thanks mate!
Thank you max 😴👍👍👍👍🥴😬
69ms to parse all of React? *nice.*
RIP Atom
I was gonna say the same. Then I found this ✝⚛😢
Douchballs lol