Bug stream fixes (#818)

* Fix glaring inlay hint issue; thanks for the report Nameless

* Fix label references; closes #728
This commit is contained in:
Auguste Rame
2022-12-13 22:07:36 -05:00
committed by GitHub
parent 5dca821eb6
commit 0ab34abc0f
4 changed files with 39 additions and 27 deletions

View File

@@ -20,8 +20,8 @@ pub fn labelReferences(
// Find while / for / block from label -> iterate over children nodes, find break and continues, change their labels if they match.
// This case can be implemented just by scanning tokens.
const first_tok = tree.firstToken(decl.decl.label_decl);
const last_tok = ast.lastToken(tree, decl.decl.label_decl);
const first_tok = tree.firstToken(decl.decl.label_decl.label);
const last_tok = ast.lastToken(tree, decl.decl.label_decl.block);
var locations = std.ArrayListUnmanaged(types.Location){};
errdefer locations.deinit(allocator);