diff options
| author | Gabriel Schneider <[email protected]> | 2026-08-02 17:38:06 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-08-02 23:11:01 -0300 |
| commit | a9263daee9413c5eff3c1f1bebcd224442fd8685 (patch) | |
| tree | f0a74fe1420cd9933cb2f85dc8313914aa674e94 /vrsite/highlight_test.go | |
| parent | e16f78b255bcf46d8c6f9a4b9e76dd7a3817edeb (diff) | |
| download | notevi-a9263daee9413c5eff3c1f1bebcd224442fd8685.tar.gz notevi-a9263daee9413c5eff3c1f1bebcd224442fd8685.zip | |
vrsite: toggle repository file list
Diffstat (limited to 'vrsite/highlight_test.go')
| -rw-r--r-- | vrsite/highlight_test.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/vrsite/highlight_test.go b/vrsite/highlight_test.go index b565785..e6897d1 100644 --- a/vrsite/highlight_test.go +++ b/vrsite/highlight_test.go @@ -45,6 +45,13 @@ var samples = []struct { // .h goes to the C++ grammar, but c.scm's patterns still have to reach it {"a.h", "// note\ntemplate <class T> struct Box { T v; };\n", map[string]string{"template": "keyword", "struct": "keyword", "// note": "comment", "T": "type"}}, + // zig names types by casing rather than by node, so Point and MAX are the + // query's two #match? heuristics rather than anything the grammar reports + {"a.zig", "// note\nconst std = @import(\"std\");\nconst Point = struct { x: u8 };\n" + + "pub fn main() !void {\n const MAX: u8 = 1;\n std.debug.print(\"hi\", .{ .x = MAX });\n}\n", + map[string]string{"const": "keyword", `"hi"`: "string", "// note": "comment", + "main": "function", "@import": "function", "u8": "type", "Point": "type", + "MAX": "constant", "x": "property"}}, {"a.json", "{\n \"a\": \"hi\",\n \"b\": 12\n}\n", map[string]string{`"hi"`: "string", `"a"`: "string-special", "12": "number"}}, {"a.sh", "# note\nif true; then\n ls -l \"$dir\"\nfi\n", |
