Ben, thank you for the attention. I held myself off elaborating further 
because the introductory content in the project's page does a much better 
job.

Tree-Sitter parses code and builds an AST out of the nodes. That same tree 
can then be smartly updated continuously by providing the locations where 
the code has changed, thus the cost and speed for re-evaluating the tree is 
much reduced, resulting in pretty much instant feedback and lower CPU usage.
Tree-Sitter also is able to highlight even incorrect syntax that would 
otherwise break completely in regex-based grammars.

More from the main author of Tree-Sitter: 
https://news.ycombinator.com/item?id=18349488
https://www.youtube.com/watch?v=0CGzC_iss-8

*Tree-sitter is already usable in Atom/Emacs *and that trend is very likely 
to be followed in all other editors. Neovim's progress is getting there 
quickly.

*The problem*: Elixir is not scheduled to be supported officially by the 
Tree-Sitter team.
*What I am proposing*: A grammar for Elixir to be written in Javascript.

Here is an example grammar for Haskell: 
https://github.com/tree-sitter/tree-sitter-haskell/blob/master/grammar.js
Or Ocaml: 
https://github.com/tree-sitter/tree-sitter-ocaml/blob/master/grammar.js
More to be found in the parsers' page: 
https://tree-sitter.github.io/tree-sitter/#available-parsers

On Friday, March 29, 2019 at 7:41:09 AM UTC-3, Ben Wilson wrote:
>
> Can you elaborate for those of us with less context? What is tree-sitter? 
> What are you proposing?
>
> On Thursday, March 28, 2019 at 10:10:14 PM UTC-4, João Paulo Silva de 
> Souza wrote:
>>
>> Seems like I wrongly opened an issue instead of posting here first -> 
>> https://github.com/elixir-lang/elixir/issues/8917.
>>
>> My reasoning is that this is not a language feature and thus I thought I 
>> could skip the proposal process. My apologies.
>>
>>
>> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>>
>> https://tree-sitter.github.io/tree-sitter/#available-parsers
>>
>> It seems like Elixir is not in the roadmap for language support.
>>
>> Atom has the most complete implementation currently. I expect other 
>> editors (e.g. Vim, VSCode, Emacs, etc...) to follow in adoption when the 
>> API stabilizes and more bugs are fixed.
>>
>> Project: https://github.com/tree-sitter/tree-sitter
>> Neovim: https://github.com/neovim/neovim/pull/9219
>> Emacs: https://github.com/karlotness/tree-sitter.el
>> VSCode: https://github.com/Microsoft/vscode/issues/50140
>>
>> Example grammar for Javascript - 
>> https://github.com/tree-sitter/tree-sitter-javascript/blob/master/grammar.js
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elixir-lang-core+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/9dfd5ff3-fd9c-47bd-af1c-111bac67f19f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to