File tree Expand file tree Collapse file tree 1 file changed +4
-24
lines changed Expand file tree Collapse file tree 1 file changed +4
-24
lines changed Original file line number Diff line number Diff line change 160
160
161
161
; std
162
162
"assert_eq" "debug_assert_eq" "assert_ne" "debug_assert_ne"
163
- )
164
- (#set! injection.language "rust-format-args-macro")
165
- (#set! injection.include-children)
166
- )
167
163
168
- ; Dioxus' "rsx!" macro relies heavily on string interpolation as well. The strings can be nested very deeply
169
- (
170
- (macro_invocation
171
- macro: [
172
- (scoped_identifier
173
- name: (_) @_macro_name )
174
- (identifier) @_macro_name
175
- ]
176
- ; TODO: This only captures 1 level of string literals. But in dioxus you can have
177
- ; nested string literals. For instance:
178
- ;
179
- ; rsx! { "{hello} world" }:
180
- ; -> (token_tree (string_literal))
181
- ; rsx! { div { "{hello} world" } }
182
- ; -> (token_tree (token_tree (string_literal)))
183
- ; rsx! { div { div { "{hello} world" } } }
184
- ; -> (token_tree (token_tree (token_tree (string_literal))))
185
- (token_tree (string_literal) @injection.content )
164
+ ; Dioxus's rsx! macro accepts string interpolation in all
165
+ ; strings, across the entire token tree
166
+ "rsx"
186
167
)
187
- (#eq? @_macro_name "rsx")
188
- (#set! injection.language "rust-format-args")
168
+ (#set! injection.language "rust-format-args-macro")
189
169
(#set! injection.include-children)
190
170
)
You can’t perform that action at this time.
0 commit comments