emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tree-sitter integration on feature/tree-sitter


From: Yoav Marco
Subject: Re: Tree-sitter integration on feature/tree-sitter
Date: Thu, 30 Jun 2022 17:37:58 +0300
User-agent: mu4e 1.6.3; emacs 29.0.50

Abin Simon <mail@meain.io> writes:

>> I see you wrote a go program to pre-process #make-range!. I also had to do
>> something similar in
>> https://github.com/emacs-tree-sitter/tree-sitter-langs/pull/99
>> due to predicate incompatibility, though I do it in Elisp right after
>> reading the query file. So I guess it's a valid solution too.
>
> Ahh, that makes sense. I just went with go just because I was bit more
> confortable writing the "parser" in go.

Ah, well I cheated :) I ran a regexp on the query to replace # with \#,
and then the whole query is a valid elisp sexp, so I read it to a list
with `read' and recursively parsed *that*. Makes for very pretty code
IMO.

  Yoav



reply via email to

[Prev in Thread] Current Thread [Next in Thread]