unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Perry Smith <pedz@easesoftware.com>
To: Drew Adams <drew.adams@oracle.com>
Cc: Yuan Fu <casouri@gmail.com>, emacs-devel <emacs-devel@gnu.org>
Subject: Re: [External] : Re: Creating a paradigm for leveraging Tree Sitter's power
Date: Sat, 24 Dec 2022 11:29:51 -0600	[thread overview]
Message-ID: <4B8E6B0C-1B8F-42F6-BA46-B81368513CB8@easesoftware.com> (raw)
In-Reply-To: <SJ0PR10MB54888F58A587E26CF807FF29F3EE9@SJ0PR10MB5488.namprd10.prod.outlook.com>

[-- Attachment #1: Type: text/plain, Size: 1425 bytes --]


> 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 #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2022-12-24 17:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-24  1:32 Creating a paradigm for leveraging Tree Sitter's power Perry Smith
2022-12-24  9:09 ` Yuan Fu
2022-12-24 10:07   ` Theodor Thornhill
2022-12-24 14:57     ` Perry Smith
2022-12-24 15:13       ` Theodor Thornhill
2022-12-24 14:32   ` Perry Smith
2022-12-24 16:52     ` [External] : " Drew Adams
2022-12-24 17:29       ` Perry Smith [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B8E6B0C-1B8F-42F6-BA46-B81368513CB8@easesoftware.com \
    --to=pedz@easesoftware.com \
    --cc=casouri@gmail.com \
    --cc=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).