fix: Some Incorrect Rust highlights (#13657)

Co-authored-by: Nik Revenco <154856872+NikitaRevenco@users.noreply.github.com>
pull/13491/head^2
Nik Revenco 2025-05-31 15:43:19 +01:00 committed by GitHub
parent 921ca08e1b
commit 2baff46b25
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 13 additions and 10 deletions

View File

@ -421,6 +421,7 @@
(#eq? @special "derive")
)
(token_repetition_pattern) @punctuation.delimiter
(token_repetition_pattern [")" "(" "$"] @punctuation.special)
(token_repetition_pattern "?" @operator)

View File

@ -113,10 +113,10 @@
name: (_) @_macro_name)
(identifier) @_macro_name
]
(token_tree
. (string_literal
(string_content) @injection.content
)
(token_tree . [
(string_literal (string_content) @injection.content)
(raw_string_literal (string_content) @injection.content)
]
)
)
(#any-of? @_macro_name
@ -156,9 +156,10 @@
]
(token_tree
. (_)
. (string_literal
(string_content) @injection.content
)
. [
(string_literal (string_content) @injection.content)
(raw_string_literal (string_content) @injection.content)
]
)
)
(#any-of? @_macro_name
@ -185,9 +186,10 @@
(token_tree
. (_)
. (_)
. (string_literal
(string_content) @injection.content
)
. [
(string_literal (string_content) @injection.content)
(raw_string_literal (string_content) @injection.content)
]
)
)
(#any-of? @_macro_name