From 27034abbaf7a5ad83f4fdb5d2d08299c30490fb6 Mon Sep 17 00:00:00 2001 From: Timon Kruiper Date: Mon, 18 May 2020 20:59:44 +0200 Subject: [PATCH] Also return from `getFieldAccessTypeNode` when a comma is found. This allows to get completion support when a function with multiple arguments is completed. --- src/analysis.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/analysis.zig b/src/analysis.zig index d818a18..e0ef1c4 100644 --- a/src/analysis.zig +++ b/src/analysis.zig @@ -382,7 +382,7 @@ pub fn getFieldAccessTypeNode( }, .Period => { var after_period = tokenizer.next(); - if (after_period.id == .Eof) { + if (after_period.id == .Eof or after_period.id == .Comma) { return current_node; } else if (after_period.id == .Identifier) { // TODO: This works for now, maybe we should filter based on the partial identifier ourselves?