diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-28 16:45:54 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:15 -0300 |
| commit | c9d5d97e4d487b92a52d765dd9c467423ddd1de1 (patch) | |
| tree | 35547658ee733fb2631a41568c682c93b5fd4746 /src/pardes.zig | |
| parent | d09c1c36e4d4e1bc57aa14f5ba4c6131b6111429 (diff) | |
| download | pardes-c9d5d97e4d487b92a52d765dd9c467423ddd1de1.tar.gz pardes-c9d5d97e4d487b92a52d765dd9c467423ddd1de1.zip | |
A REPL's language is named and found as the syntax table finds one: aliases, any case
Repl took only the grammar's exact name, and a file's language was found by a case-sensitive suffix of its path, apart from the aliases a code fence already had. The aliases move to grammar_manifest with byName and byPath, which syntax, Repl and langOf share, so `Repl py` and a .PY file work. The line-by-line warning is for the python language, not an id that starts with python. Joincol's doc line was sitting on Repl.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/pardes.zig')
| -rw-r--r-- | src/pardes.zig | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pardes.zig b/src/pardes.zig index 20406895..c5413672 100644 --- a/src/pardes.zig +++ b/src/pardes.zig @@ -1458,7 +1458,8 @@ test "a REPL bound for a language takes the exec made on a body in it; tags, Exe try std.testing.expect(p.panes[1].?.repl == null); try std.testing.expect(std.mem.indexOf(u8, p.panes[1].?.msg[0..p.panes[1].?.msg_len], "python") != null); try std.testing.expect(p.executeBuiltinLine(1, "Repl python")); - try std.testing.expect(p.executeBuiltinLine(1, "Repl python")); // again: no change + // again, as a code fence may name it: no change + try std.testing.expect(p.executeBuiltinLine(1, "Repl PY")); var idbuf: [48]u8 = undefined; try std.testing.expectEqualStrings("python-a", exec.replId(&idbuf, p.panes[1].?)); try std.testing.expect(std.mem.endsWith(u8, try tagline.tagPrefix(p, p.panes[1].?), " python-a")); |
