emacs-devel
[Top][All Lists]
Advanced

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

Re: How to add pseudo vector types


From: Yuan Fu
Subject: Re: How to add pseudo vector types
Date: Sat, 24 Jul 2021 14:06:52 -0400

> We should ask the TS developers to provide a way of specifying custom
> memory allocation/release function as part of TS initialization.  It
> is a feature many packages provide.

I commented on tree-sitter’s 1.0 checklist.

> Isn't there a better way of updating those than manually take them out
> of the TS grammar?  Maybe write a short program linked against TS that
> would spill them in some format that's convenient to use?  Manual
> updates are a serious maintenance burden.

How does this convenient format looks like, in your mind? The grammar 
definition is already the “source”, I don’t see a way to magically make it 
easier to work with. What does “manual updates” refer to? If you mean updating 
patterns like

(init_declarator
 declarator: (identifier) @font-lock-variable-name-face)

(parameter_declaration
 declarator: (identifier) @font-lock-variable-name-face)

when a language’s grammar changes, I don’t think we need to update them often, 
or ever. And It is not harder than updating font-lock-keywords when a language 
adds a new fancy syntax.

Yuan


reply via email to

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