[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Tree sitter support for C-like languages
From: |
Yuan Fu |
Subject: |
Re: Tree sitter support for C-like languages |
Date: |
Tue, 22 Nov 2022 17:55:03 -0800 |
> On Nov 21, 2022, at 3:15 AM, Theodor Thornhill <theo@thornhill.no> wrote:
>
>>>
>>> On Nov 16, 2022, at 12:58 PM, Yuan Fu <casouri@gmail.com> wrote:
>>>
>>>>>
>>>>> :language mode
>>>>> :override t
>>>>> :feature 'statement
>>>>> '((expression_statement (identifier) @font-lock-variable-name-face)
>>>>> (labeled_statement
>>>>> label: (statement_identifier) @font-lock-type-face))
>>>>>
>>>>
>>>> stuff like:
>>>> ```
>>>> add_edge: // <- this thing
>>>> gx += WINDOW_LEFT_EDGE_X (w);
>>>> gy += WINDOW_TOP_EDGE_Y (w);
>>>>
>>>> store_rect: // <- and this thing
>>>> STORE_NATIVE_RECT (*rect, gx, gy, width, height);
>>>>
>>>> ```
>>>
>>> What’s the intention of this query?
>>>
>>> (expression_statement (identifier) @font-lock-variable-name-face)
>>>
>>> It seems to match statements like
>>>
>>> var;
>>>
>>> ?
>>>
>>> Yuan
>>
>> You probably missed this message, ping :-)
>>
>
> Yeah, sorry! I think it can be removed. I really don't remember why I
> made that...
>
> I added the fix in a patch, and also fixed a typo (I think that messed
> up some fontlocking in c-ts-mode) as an apology :-)
>
> Theo
Thanks! Though I made those changes before I got to the patch. Patch
appreciated :-)
Yuan
- Re: Tree sitter support for C-like languages, (continued)
Re: Tree sitter support for C-like languages, Yuan Fu, 2022/11/16