From 5838a34101343e801f19cb080c0dc70c68dd0c93 Mon Sep 17 00:00:00 2001 From: Auguste Rame Date: Fri, 8 Jul 2022 22:57:34 +0200 Subject: [PATCH] Fix small bugs Thanks for the heads up Travis :) --- src/main.zig | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main.zig b/src/main.zig index f4cc653..d20bd4f 100644 --- a/src/main.zig +++ b/src/main.zig @@ -255,6 +255,9 @@ fn publishDiagnostics(arena: *std.heap.ArenaAllocator, handle: DocumentStore.Han else => continue, }; + if (std.mem.eql(u8, tree.tokenSlice(name_token_index), "_")) + continue; + const pit_start = tree.firstToken(scope_data); const pit_end = ast.lastToken(tree, scope_data); @@ -760,6 +763,12 @@ fn hoverSymbol(id: types.RequestId, arena: *std.heap.ArenaAllocator, decl_handle .tagged_union_enum_tag, .tagged_union_enum_tag_trailing, => tree.tokenSlice(tree.nodes.items(.main_token)[p] - 2), // NOTE: This is a hacky nightmare but it works :P + .fn_proto, + .fn_proto_multi, + .fn_proto_one, + .fn_proto_simple, + .fn_decl, + => "fn", // TODO:(?) Add more info? else => tree.getNodeSource(p), }, else => "unknown",