Skip to content

Commit 66a9b5f

Browse files
tronikelislewis6991
authored andcommitted
feat(rust): add let = block context
1 parent dca8726 commit 66a9b5f

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

queries/rust/context.scm

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,3 +115,8 @@
115115
(macro_definition
116116
name: (_) @context.end
117117
) @context
118+
119+
; let = {}
120+
(let_declaration
121+
value: (block (_) @context.end)
122+
) @context

test/lang/test.rs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,3 +218,23 @@ union Bar {
218218
c: u32,
219219

220220
}
221+
222+
// {{TEST}}
223+
fn letblock() { // {{CONTEXT}}
224+
225+
let _foo = { // {{CONTEXT}}
226+
227+
228+
229+
230+
231+
232+
233+
234+
235+
236+
237+
// {{CURSOR}}
238+
}
239+
240+
}

0 commit comments

Comments
 (0)