4 ms·
The IDE could parse the macro definition and highlight accordingly. (It would know where to expect an identifier and where to expect an expression etc.)
by whyever 12y ago
The IDE could parse the macro definition and highlight accordingly. (It would know where to expect an identifier and where to expect an expression etc.)
- steveklabnik 12y ago> (It would know where to expect an identifier and where to expect an expression etc.) But that doesn't mean that what's in the macro should be highlighted like Rust: sql!("SELECT * FROM users WHERE name = $1"); is a macro provided by https://github.com/sfackler/rust-postgres-macros https://github.com/sfackler/rust-postgres-macros , and should be highlighted like SQL, not like a Rust string. sql!("SELECT * FORM users WHERE name = $1"); throws an error, because it's malformed.