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: Yuan Fu <casouri <at> gmail.com>
To: 72388 <at> debbugs.gnu.org
Subject: bug#72388: 31.0.50; Use tree-sitter-cuda grammar but with tree-sitter-cpp's font-lock/indentation rules
Date: Tue, 30 Jul 2024 17:05:48 -0700
Originated from "Implementing cuda-ts-mode” on emacs-devel [1]. Basically we want to create a major mode for tree-sitter-cuda. Tree-sitter-cuda grammar is basically cpp grammar plus some cuda rules. So it makes sense to reuse cpp mode’s font-lock/indentation rules. But those rules directs to the ‘cpp grammar. A simple solution is to allow users to map one language to another; then when ever lisp tries to create or get a parser for lang A, lang B is used.

Yuan

[1] Message-ID: <v2a2js5ssoz7d3hquenaieubgmj263tz3ejbogordd5t3ys4v2 <at> efpjojlxrlv4>



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.