emacs-devel
[Top][All Lists]
Advanced

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

Re: [External] : Re: Creating a paradigm for leveraging Tree Sitter's po


From: Perry Smith
Subject: Re: [External] : Re: Creating a paradigm for leveraging Tree Sitter's power
Date: Sat, 24 Dec 2022 11:29:51 -0600

> On Dec 24, 2022, at 10:52, Drew Adams <drew.adams@oracle.com> wrote:
> 
>>>> I'll call this the "primitive routine".  The routine would be
>>>> responsible for returning a beginning and end (in a cons cell) and it
>>>> would be the routine's responsibility to make sure that the beginning
>>>> and end lie after (in the forward case) or before (in the backward
>>>> case) the point that is passed in.
>>> 
>>> You mean beginning and end of (symbol | string | statement | …)?
>> 
>> Yes.  A “simple” routine for each concept that the language has that
>> would Return the beg / end of that construct.  e.g. foo-bar-statement
>> would return the beg / end of a statement.
> 
> I guess your "concept" corresponds roughly
> to what `thing-at-point's calls a THING.
> 
> Returning a cons with the "beg / end" of a
> THING is what `bounds-of-thing-at-point' does.
> 
> Of course, it's based on functions such as
> `forward-thing' and those named on properties
> `beginning-op' and `end-op' of the THING.
> (It's not based on Tree Sitter.)
> 
> If Tree Sitter were to define a `beginning-op'
> and `end-op' for each "concept" (THING)…


Fascinating.  I will look into this.

Strangely, I’ve used GNU Emacs since it was first released around 1985
but I tend to stay within very small boundaries of all of its features
so I am mostly unaware of 99% of Emacs’ concepts and features.

Attachment: signature.asc
Description: Message signed with OpenPGP


reply via email to

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