Fixed lastToken when called on function prototypes with no return type

This commit is contained in:
Alexandros Naskos
2021-04-05 19:44:45 +03:00
parent 9ccee0f82f
commit 4b0d86f0bc
2 changed files with 72 additions and 11 deletions

View File

@@ -1838,7 +1838,12 @@ const GetDocumentSymbolsContext = struct {
encoding: offsets.Encoding,
};
fn getDocumentSymbolsInternal(allocator: *std.mem.Allocator, tree: ast.Tree, node: ast.Node.Index, context: *GetDocumentSymbolsContext) anyerror!void {
fn getDocumentSymbolsInternal(
allocator: *std.mem.Allocator,
tree: ast.Tree,
node: ast.Node.Index,
context: *GetDocumentSymbolsContext,
) anyerror!void {
const name = getDeclName(tree, node) orelse return;
if (name.len == 0)
return;