Merge pull request #71 from alexnask/test_block_completions

Test block local completions
This commit is contained in:
Auguste Rame 2020-05-21 09:14:34 -04:00 committed by GitHub
commit 44f33c631b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -524,6 +524,10 @@ pub fn declsFromIndexInternal(decls: *std.ArrayList(*ast.Node), tree: *ast.Tree,
if (func.body_node) |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 => {
var index: usize = 0;
while (node.iterate(index)) |inode| : (index += 1) {