GNU bug report logs - #72388
31.0.50; Use tree-sitter-cuda grammar but with tree-sitter-cpp's font-lock/indentation rules

Previous Next

Package: emacs;

Reported by: Yuan Fu <casouri <at> gmail.com>

Date: Wed, 31 Jul 2024 00:07:01 UTC

Severity: normal

Found in version 31.0.50

Full log


View this message in rfc822 format

From: Ergus <spacibba <at> aol.com>
To: 72388 <at> debbugs.gnu.org
Cc: Yuan Fu <casouri <at> gmail.com>
Subject: bug#72388: 31.0.50; Use tree-sitter-cuda grammar but with tree-sitter-cpp's font-lock/indentation rules
Date: Tue, 13 Aug 2024 01:10:57 +0200
Hi Yuan:

I am just trying to use the new treesit-language-remap-alist and so far
I understand your idea of how to make it work for the basics. But it is
not clear how can I use the new var to add the new syntax entries.

I mean, looking at the grammar:

https://github.com/tree-sitter-grammars/tree-sitter-cuda/blob/master/grammar.js

You can see that it is the inherited C++ syntax, with extra entries in
some fields (like _declaration_modifiers or delete_expression). For this
part the new variable may work perfectly.

However there are a few "new" entries like: kernel_call_expression,
kernel_call_syntax and launch_bounds that will need special handling.

What's your suggestion?

I mean, for the latest what we really need is to extend (partially
redefine) the c-ts-mode--indent-styles, c-ts-mode--keywords and so on.

Is that the intended approach?

Best,
Ergus




This bug report was last modified 135 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.