diff --git a/src/analysis.zig b/src/analysis.zig index 5cf4b65..e1c39aa 100644 --- a/src/analysis.zig +++ b/src/analysis.zig @@ -110,6 +110,7 @@ pub fn getFunctionSnippet(allocator: *std.mem.Allocator, tree: *ast.Tree, func: if (param_decl.var_args_token) |_| { try buffer.appendSlice("..."); + continue; } var curr_tok = param_decl.type_node.firstToken(); diff --git a/src/document_store.zig b/src/document_store.zig index 1b142f5..8eb9da9 100644 --- a/src/document_store.zig +++ b/src/document_store.zig @@ -214,9 +214,6 @@ pub fn applyChanges(self: *DocumentStore, handle: *Handle, content_changes: std. // Perhaps on new sane text we can go through imports // and remove those that are in the import_uris table // but not in the file anymore. -// @TODO: Make this hold a single tree, remove tree param -// from analysis functions that take an import_context. -// (can we reset-reuse it or do we need to deinit-init a new one?) pub const AnalysisContext = struct { store: *DocumentStore, handle: *Handle, @@ -227,7 +224,7 @@ pub const AnalysisContext = struct { pub fn onImport(self: *AnalysisContext, import_str: []const u8) !?*std.zig.ast.Node { const allocator = self.store.allocator; - + const final_uri = if (std.mem.eql(u8, import_str, "std")) if (self.store.std_uri) |std_root_uri| try std.mem.dupe(allocator, u8, std_root_uri) else {