From: Yuan Fu <casouri@gmail.com>
To: Po Lu <luangruo@yahoo.com>
Cc: 61482@debbugs.gnu.org
Subject: bug#61482: 30.0.50; tree-sitter-c doesn't support _Generic
Date: Tue, 21 Feb 2023 00:56:40 -0800 [thread overview]
Message-ID: <31496BCE-4A1B-4F35-BCD9-B562E60E1FAA@gmail.com> (raw)
In-Reply-To: <87v8k5vazy.fsf@yahoo.com>
Po Lu <luangruo@yahoo.com> writes:
> 2011 Standard C has a feature that works like `switch', except it
> switches upon the type of an expression at compile time.
>
> This does not seem to be supported at all with c-ts-mode:
>
> {
> const char *typename = _Generic ((expr),
> const char *:
> "const char *",
> int:
> "int",
> unsigned long:
> "unsigned long",
> default:
> NULL);
> }
>
> here, none of the types are fontified (which fares worse than CC Mode),
> nor is _Generic fontified as a keyword. Indenting anywhere inside the
> _Generic expression also results in nothing happening.
That’s the same as _Noreturn, tree-sitter-c doesn’t support it now. See
https://github.com/tree-sitter/tree-sitter-c/issues/124, I opened an
issue requesting for _Generic and _Noreturn. But I don’t really know
much about these features, please see if I described it correctly.
Yuan
prev parent reply other threads:[~2023-02-21 8:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87v8k5vazy.fsf.ref@yahoo.com>
2023-02-13 15:30 ` bug#61482: 30.0.50; tree-sitter-c doesn't support _Generic Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-21 8:56 ` Yuan Fu [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=31496BCE-4A1B-4F35-BCD9-B562E60E1FAA@gmail.com \
--to=casouri@gmail.com \
--cc=61482@debbugs.gnu.org \
--cc=luangruo@yahoo.com \
/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).