emacs-devel
[Top][All Lists]
Advanced

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

Re: A few questions about c++-ts-mode.


From: Eli Zaretskii
Subject: Re: A few questions about c++-ts-mode.
Date: Thu, 09 May 2024 08:03:12 +0300

> Date: Wed, 08 May 2024 23:05:10 +0200
> From: Ergus <spacibba@aol.com>
> 
> >> > 2. Doc string comments are fontified like normal comments. It looks like
> >> >  treesiter does not recognize them at all. Is this something we need to
> >> >  report to treesitter or we need to workaround it in emacs side?
> >> 
> >> I’m working on that. I think the best way is to workaround it in Emacs.
> >
> >Please note that some of those specially-formatted comments are
> >explicitly supported by the grammar.
> >
> 
> It looks like tree sitter already supports this using language injection:
> 
> <https://github.com/tree-sitter/tree-sitter-cpp/issues/116>
> 
> I am not sure if we can handle this same way in emacs. Or if it is a better 
> or worst approach than using a made in home workaround.

If the only solution is language injection, then doing that our usual
way (with regexps etc.) is easier and more flexible.  I thought I saw
some commits in the C++ grammar that actually support that in the
grammar itself.  If there is such support, we should use it, IMO.



reply via email to

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