Fuzzer fixes (#940)

* better handling of container_decl_arg_trailing

* ignore semantic token when moving backwards

* use custom ast functions instead of from std
This commit is contained in:
Techatrix
2023-01-26 22:04:49 +01:00
committed by GitHub
parent fe54fb7cfa
commit 6019eff13e
3 changed files with 32 additions and 27 deletions

View File

@@ -32,6 +32,18 @@ test "semantic tokens - comments" {
// TODO more tests
}
test "semantic tokens - string literals" {
// https://github.com/zigtools/zls/issues/921
try testSemanticTokens(
\\"
\\"",//
\\"":
,
// no idea if this output is correct but at least it doesn't crash
&.{ 1, 3, 3, 8, 0, 1, 0, 2, 4, 0, 0, 0, 2, 9, 0 },
);
}
const file_uri = switch (builtin.os.tag) {
.windows => "file:///C:/test.zig",
else => "file:///test.zig",