all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "João Paulo Labegalini de Carvalho" <jaopaulolc@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org, Yuan Fu <casouri@gmail.com>,
	 Theodor Thornhill <theo@thornhill.no>,
	Eli Zaretskii <eliz@gnu.org>
Subject: Re: Implementation direction for shell-script-mode with tree-sitter
Date: Tue, 25 Oct 2022 10:26:32 -0600	[thread overview]
Message-ID: <CAGjvy2_a2WRVCOSZRa74p+ztNv4zoRW4rDPPeKWV+qJqejOzAg@mail.gmail.com> (raw)
In-Reply-To: <jwvy1t352s6.fsf-monnier+emacs@gnu.org>

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

> AFAIK `time` is clearly a bug in the tree-sitter grammar.
> E.g. it probably causes a misparse for things like:
>
>     time while ... do ... done
>

That was my impression as well.

The same probably holds for `coproc`.
> I suspect that for the other ones it doesn't make much difference, OTOH.
> So maybe the other ones were deliberately omitted to keep
> the grammar simpler.
>

So maybe I should just use a more generic query and use a regex to fontify
the keywords. Something like this:

(command_name ((word) @font-lock-keyword-face
               (:match <rx string regex here> @font-lock-keyword-face)))

-- 
João Paulo L. de Carvalho
Ph.D Computer Science |  IC-UNICAMP | Campinas , SP - Brazil
Postdoctoral Research Fellow | University of Alberta | Edmonton, AB - Canada
joao.carvalho@ic.unicamp.br
joao.carvalho@ualberta.ca

[-- Attachment #2: Type: text/html, Size: 1722 bytes --]

  reply	other threads:[~2022-10-25 16:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-25 15:05 Implementation direction for shell-script-mode with tree-sitter João Paulo Labegalini de Carvalho
2022-10-25 15:46 ` Stefan Monnier
2022-10-25 16:26   ` João Paulo Labegalini de Carvalho [this message]
2022-10-26  0:52 ` Po Lu
2022-10-26 15:48   ` João Paulo Labegalini de Carvalho
2022-10-27  0:54     ` Po Lu
2022-10-27  6:06       ` Eli Zaretskii
2022-10-27 14:23         ` João Paulo Labegalini de Carvalho
2022-10-27 15:53           ` Eli Zaretskii
2022-10-27 14:22       ` João Paulo Labegalini de Carvalho

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

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

  git send-email \
    --in-reply-to=CAGjvy2_a2WRVCOSZRa74p+ztNv4zoRW4rDPPeKWV+qJqejOzAg@mail.gmail.com \
    --to=jaopaulolc@gmail.com \
    --cc=casouri@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=theo@thornhill.no \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.