Fixed error.<Foo> highlighting

This commit is contained in:
Alexandros Naskos 2021-03-26 21:11:35 +02:00
parent 06518778c1
commit 2fd8ab7626
No known key found for this signature in database
GPG Key ID: 02BF2E72B0EA32D2

View File

@ -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 => {