|
From: | Noah Peart |
Subject: | bug#70464: [PATCH] Add font-locking for Rust macro variables |
Date: | Fri, 19 Apr 2024 09:44:26 -0700 |
Noah,
...and if you decide to add ert-font-lock tests and something is not
working as expected - let me know, happy to fix or extend
ert-font-lock.
Thanks!
On Fri, 19 Apr 2024 at 08:42, Yuan Fu <casouri@gmail.com> wrote:
>
>
> Noah Peart <noah.v.peart@gmail.com> writes:
>
> > Tags: patch
> >
> > Adds some tree-sitter font-locking rules in rust-ts-mode to fontify
> > meta variables, their types, and repetition operators in macros.
> >
> > These rules add new font-locking as indicated in the following
> > snippet:
> >
> > macro_rules! unsafe_raw_call {
> > ($env:expr, $name:ident $(, $args:expr)*) => {
> > // ^ font-lock-variable-name-face
> > // ^ font-lock-type-face
> > // ^ font-lock-operator-face
> > // ^ font-lock-operator-face
> > {
> > let env = $env;
> > // ^ font-lock-variable-use-face
> > let result = unsafe {
> > let $name = raw_fn!(env, $name);
> > $name(env.raw $(, $args)*)
> > };
> > env.handle_exit(result)
> > }
> > };
> > }
> >
> > I also removed the last occurrence of the following duplicated rule from the `type` feature:
> > (type_identifier) @font-lock-type-face
> >
>
> Great! Thanks! I’ll merge this in some time once I figure out whether
> should we apply it to emacs-29 or master.
>
> Meanwhile, it seems that you’ve recently working on tree-sitter modes.
> If you’re interested, maybe you can take a look at ert-font-lock, and
> add some tests that cover the bugs your patches fixes? This is
> completely optional, of course. I bought it up because I think you might
> be interested.
>
> Yuan
>
>
>
--
Regards,
Vladimir Kazanov
[Prev in Thread] | Current Thread | [Next in Thread] |