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 19:43:53 +0300

> From: Yuan Fu <casouri@gmail.com>
> Date: Wed, 28 Jul 2021 12:36:33 -0400
> Cc: Eli Zaretskii <eliz@gnu.org>,
>  Clément Pit-Claudel <cpitclaudel@gmail.com>,
>  monnier@iro.umontreal.ca, emacs-devel <emacs-devel@gnu.org>
> 
> > What, exactly, will the buffer-text fetch code do if tree-sitter
> > violates the narrowing (by some error in tree-sitter or user code)?
> > throw an exception? return a null string?
> 
> In my current implementation, if tree-sitter access buffer content outside of 
> narrowed region, it reads whitespaces, if it access buffer content outside of 
> the buffer, it reads null string. Neither case throws an error.

What does TS expect the reader function to return when it hits the
beginning or end of buffer text?  I think we should behave the same
when it tries to go beyond the accessible portion.  There should be no
difference between going beyond the restriction and going beyond EOB.




reply via email to

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