From 26cc3392358f6d25ec6129e444650a1968ac8dca Mon Sep 17 00:00:00 2001 From: Alexandros Naskos Date: Thu, 21 May 2020 15:16:45 +0300 Subject: [PATCH] Add test block local completion support --- src/analysis.zig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/analysis.zig b/src/analysis.zig index 10bc4f0..8ebd495 100644 --- a/src/analysis.zig +++ b/src/analysis.zig @@ -513,6 +513,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) {