emacs-devel
[Top][All Lists]
Advanced

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

Re: Implementation direction for shell-script-mode with tree-sitter


From: Stefan Monnier
Subject: Re: Implementation direction for shell-script-mode with tree-sitter
Date: Tue, 25 Oct 2022 11:46:37 -0400
User-agent: Gnus/5.13 (Gnus v5.13)

> 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




reply via email to

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