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: Eli Zaretskii
Subject: Re: How to add pseudo vector types
Date: Wed, 28 Jul 2021 20:54:31 +0300

> From: Yuan Fu <casouri@gmail.com>
> Date: Wed, 28 Jul 2021 13:47:42 -0400
> Cc: Stephen Leake <stephen_leake@stephe-leake.org>,
>  cpitclaudel@gmail.com,
>  monnier@iro.umontreal.ca,
>  emacs-devel@gnu.org
> 
> Could you describe the desired effect on tree-sitter when the buffer is 
> narrowed?

The behavior should be the same as if the text before and after the
narrowed region didn't exist.

If we just deny accessibility of the hidden region from tree-sitter, 
tree-sitter is still aware of the hidden text, because it has previously parsed 
the hidden text and stored the result in the parse tree.

The adherence to narrowing is for the use cases where TS is _always_
invoked on the same narrowed region.  You seem to be thinking about
changes in the narrowing while TS is parsing, or between consecutive
re-parsing calls, but I see no interesting/important use cases which
would need to do that.  And if there are some tricky cases which do
need this, the respective Lisp programs will have to deal with the
problem.



reply via email to

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