massivemadness / Squircle-CE

👨‍💻 Squircle CE is a fast and free multi-language code editor for Android
https://play.google.com/store/apps/details?id=com.blacksquircle.ui
Apache License 2.0
1.38k stars 101 forks source link

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

Open RpxdYTX opened 8 months ago

RpxdYTX commented 8 months ago

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