From: Stefan Monnier <monnier@iro.umontreal.ca>
To: "João Paulo Labegalini de Carvalho" <jaopaulolc@gmail.com>
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 11:46:37 -0400 [thread overview]
Message-ID: <jwvy1t352s6.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <CAGjvy2_a_BUUD_zBC_4_s3UN6DFbhoru_E5P2u2TX-fQ+Juewg@mail.gmail.com> ("João Paulo Labegalini de Carvalho"'s message of "Tue, 25 Oct 2022 09:05:10 -0600")
> The tree-sitter-bash grammar does not include many reserved words and
> builtin commands that are currently fontified by the regex based
> fontication in shell-script-mode.
>
> Here a list of the ones that tree-sitter-bash does not recognize:
>
> ("time" "coproc" "type" "trap" "exit" "exec" "continue" "break" "return"
> "logout" "bye")
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
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.
Stefan
next prev parent reply other threads:[~2022-10-25 15:46 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 [this message]
2022-10-25 16:26 ` João Paulo Labegalini de Carvalho
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
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=jwvy1t352s6.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=casouri@gmail.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=jaopaulolc@gmail.com \
--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 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).