[Top][All Lists]

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

Re: Tree sitter support for C-like languages

From: Stefan Monnier
Subject: Re: Tree sitter support for C-like languages
Date: Mon, 14 Nov 2022 07:46:55 -0500
User-agent: Gnus/5.13 (Gnus v5.13)

>> On Nov 13, 2022, at 7:48 PM, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>>> The parse tree has errors and it fontifies int in warning face.
>>> Then when you insert the closing bracket, the parse tree is complete
>>> int
>>> foo (void)
>>> {
>>> int bar = 0;
>>> }
>>> Int is still in warning face because jit-lock doesn’t know it needs to be
>>> refontified.
>> Doesn't tree-sitter tell us that the node for `int` has changed?
> Yes and no, but mostly no. Tree-sitter can tell if a node “has changes”.

I mean: when we send to tree-sitter a new version of the buffer text
(i.e. we ask it to perform an incremental reparse), it tells us which
parts of the tree have changed, right?  If so, does this include the
part containing the "int" node in the above case?


reply via email to

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