|
From: | Dmitry Gutov |
Subject: | Re: Using incremental parsing in Emacs |
Date: | Fri, 3 Jan 2020 19:00:39 +0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 |
On 03.01.2020 12:05, Eli Zaretskii wrote:
Would someone like to try to figure out how we could use the incremental parsing technology in Emacs for making our programming-language support more accurate and efficient? One package that implements this technology is tree-sitter: https://tree-sitter.github.io/tree-sitter/ AFAIU, these capabilities could be used as an alternative to regexp- and syntax-pps-based font-lock, better code folding, completion, refactoring, and other similar features; in general, any feature which would benefit from having a parse tree for the source code in a buffer.
Quite some time ago we talked with Stefan about supporting certain complex language features, and kind of agreed that we could use a new way to specify syntax, something to supersede syntax-propertize-function (and maybe font-lock).
Tree-Sitter could be an example of how such new grammars could be structured, but I think we'd need that implemented in Lisp. Not in a foreign library that we import through modules mechanism.
[Prev in Thread] | Current Thread | [Next in Thread] |