Squircle-CE icon indicating copy to clipboard operation
Squircle-CE copied to clipboard

Rust "attribute" macros (#[macro]) break the syntax

Open RpxdYTX opened this issue 2 years ago • 0 comments

Please consider making a Pull Request if you are capable of doing so.

App Version: 2023.2.0

Affected Device(s): Samsung Galaxy J5 with Android 10 (Lineage OS)

Describe the bug Rust macros like #[derive] only go up to the next ']', so macros like logos::regex (e.g #[regex("[0-9]")]) are kind of broken (in the case o regex especifically, since the app thinks the macro is just #[regex("[0-9] the other quote becomes a never ending string)

To Reproduce Steps to reproduce the behavior:

  1. Try to use a macro with another pair of square brackets inside

Expected behavior The syntax highlighting should only stop considering the macro once the respective square bracket is met

RpxdYTX avatar Dec 15 '23 16:12 RpxdYTX