lezer-parser/rust

Highlighting issue with macros

acheroncrypto opened this issue · 2 comments

Using a keyword inside an attribute macro results in corrupted highlighting and unwanted indentation on next line.

Example:
image

Quotes are able to stop the highlighting issue but indentation on next line persists.
image

Example code

It would have made figuring out what you mean a lot easier if you had presented valid rust code, instead of a bunch of code that is invalid in ways that have nothing to do with what you mean here.

But I guess what you wanted to say is that something like #[foo(mut)] should be valid. Attached patch fixes that.

Thank you but I had already attached a valid code at the end. #[foo(mut)] was actually not causing any issues. The issue started when there is a comma after the mut like in the example I've sent #[account(mut, has_one = authority)].

Don't know if the issue is fixed as the package is not yet updated but thank you.