Add test block local completion support

This commit is contained in:
Alexandros Naskos 2020-05-21 15:16:45 +03:00
parent 4acb77f09e
commit 26cc339235

View File

@ -513,6 +513,10 @@ pub fn declsFromIndexInternal(decls: *std.ArrayList(*ast.Node), tree: *ast.Tree,
if (func.body_node) |body_node| if (func.body_node) |body_node|
try declsFromIndexInternal(decls, tree, body_node); try declsFromIndexInternal(decls, tree, body_node);
}, },
.TestDecl => {
const test_decl = node.cast(ast.Node.TestDecl).?;
try declsFromIndexInternal(decls, tree, test_decl.body_node);
},
.Block => { .Block => {
var index: usize = 0; var index: usize = 0;
while (node.iterate(index)) |inode| : (index += 1) { while (node.iterate(index)) |inode| : (index += 1) {