From 2fd8ab76260552700f124ce6e19ad97bcc2f94ce Mon Sep 17 00:00:00 2001 From: Alexandros Naskos Date: Fri, 26 Mar 2021 21:11:35 +0200 Subject: [PATCH] Fixed error. highlighting --- src/semantic_tokens.zig | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/semantic_tokens.zig b/src/semantic_tokens.zig index cda01d2..9a896cc 100644 --- a/src/semantic_tokens.zig +++ b/src/semantic_tokens.zig @@ -160,12 +160,9 @@ const Builder = struct { .doc_comment => .{ .documentation = true }, else => unreachable, }); - // @@@ - // comments_end = i; } } - std.debug.print("DELTA:\n```\n{s}\n```\n(LEN: {})\n", .{self.handle.tree.source[comments_end..starts[token]], starts[token] - comments_end}); const delta = offsets.tokenRelativeLocation( self.handle.tree, comments_start, @@ -526,7 +523,7 @@ fn writeNodeTokens( try gap_highlighter.end(lastToken(tree, node)); }, .error_value => { - // if (error_tag.doc_comments) |docs| try writeDocComments(builder, handle.tree, docs); + try writeToken(builder, datas[node].lhs - 1, .keyword); try writeToken(builder, datas[node].rhs, .errorTag); }, .identifier => {