[Top][All Lists]

[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: Tue, 27 Jul 2021 10:56:22 -0400

>> We need to “delete” the hidden text and “re-insert” when we widen the
>> buffer. I’ll try to make it a no-op as long as we remember to widen
>> before calling tree-sitter to parse anything.
> First, the only thing TS deletes is tree nodes, not text; it does not
> have a copy of the buffer.
> Why do you think we need to delete the tree nodes corresponding to the
> hidden text? They provide exactly the context needed to parse the
> visible text properly.

I don’t think we need to, but I assume that tree-sitter will delete the 
corresponding nodes if we hide the text from it. For us, the text is there, 
just hidden; for tree-sitter, the text is deleted. 


reply via email to

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