[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Tree-sitter integration on feature/tree-sitter
From: |
Yuan Fu |
Subject: |
Re: Tree-sitter integration on feature/tree-sitter |
Date: |
Sat, 18 Jun 2022 01:25:01 -0700 |
> On Jun 17, 2022, at 11:22 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>
>> From: Yuan Fu <casouri@gmail.com>
>> Date: Fri, 17 Jun 2022 17:14:58 -0700
>> Cc: emacs-devel@gnu.org
>>
>>>>>> Moving forward, I want to make treesit-parser-list internal and turn it
>>>>>> into a function that returns the parser list. And add a function to
>>>>>> remove a parser from the parser list.
>>>>>
>>>>> And a function to add to the list, right? Or does it already exist?
>>>>
>>>> Creating a parser automatically adds it to the parser list of a buffer.
>>>
>>> Then removing a parser means we actually delete it?
>>
>> Not sure what do you men “delete”.
>
> If creating a parser adds it to the list, then I guessed the semantics
> of removing from the list is the opposite: having the parser no longer
> exist, i.e. "delete" it.
>
> But now I'm confused by what you say here:
>
>> Treesit-parser-delete removes the parser from the parser list of a buffer,
>> so it is never kept up-to-date with that buffer again. But you can still do
>> stuff with it until it is gc’ed.
>
> If we already have treesit-parser-delete, and that call removes the
> parser from the list, then why would we need a function "to remove a
> parser from the list"? It sounds like treesit-parser-delete already
> does it?
Yeah. There is no other function, treesit-parser-delete deletes and removes the
parser. Though I don’t know how can you make a Lisp_Object “no longer exist”.
Normally we just turn #<stuff> into #<deleted stuff>, right?
Yuan
Re: Tree-sitter integration on feature/tree-sitter, Eli Zaretskii, 2022/06/17
- Re: Tree-sitter integration on feature/tree-sitter, Yuan Fu, 2022/06/17
- Re: Tree-sitter integration on feature/tree-sitter, Eli Zaretskii, 2022/06/17
- Re: Tree-sitter integration on feature/tree-sitter, Yuan Fu, 2022/06/17
- Re: Tree-sitter integration on feature/tree-sitter, Eli Zaretskii, 2022/06/18
- Re: Tree-sitter integration on feature/tree-sitter,
Yuan Fu <=
- Re: Tree-sitter integration on feature/tree-sitter, Eli Zaretskii, 2022/06/18
- Re: Tree-sitter integration on feature/tree-sitter, Yuan Fu, 2022/06/18
- Re: Tree-sitter integration on feature/tree-sitter, Eli Zaretskii, 2022/06/19
- Re: Tree-sitter integration on feature/tree-sitter, Yuan Fu, 2022/06/19
- Re: Tree-sitter integration on feature/tree-sitter, Eli Zaretskii, 2022/06/20
- Re: Tree-sitter integration on feature/tree-sitter, Yuan Fu, 2022/06/20
- Re: Tree-sitter integration on feature/tree-sitter, Eli Zaretskii, 2022/06/20
- Re: Tree-sitter integration on feature/tree-sitter, Yuan Fu, 2022/06/21
- Re: Tree-sitter integration on feature/tree-sitter, Eli Zaretskii, 2022/06/21
- Re: Tree-sitter integration on feature/tree-sitter, Yuan Fu, 2022/06/21