diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-09 02:22:05 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-09 02:27:47 -0300 |
| commit | aabbccba49772cf73c7e35ae470245e9fda9d6ff (patch) | |
| tree | 7d042c7f7590267b5690e3c7a5b8eb925e37598d /src/sam_edit.zig | |
| parent | bfb74e76ef7dfe305a26010edc86dac456034c3e (diff) | |
| download | pardes-aabbccba49772cf73c7e35ae470245e9fda9d6ff.tar.gz pardes-aabbccba49772cf73c7e35ae470245e9fda9d6ff.zip | |
locality: lsp_client's helpers beside their callers: query's (status with sourceName, indexCommand, nowUs, posOf, fromIndex with emitDefinitions, related and emitOcc), run's (syncDoc, byteCol, hierarchy with hierText), ensure's (rootOf, binOf), byteSpan with strictOffset beside renameEdits, pathOf beside emitAt; the connection block (ensure, handshake, reader) stays together; sam_edit's stepRune before Exec
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/sam_edit.zig')
| -rw-r--r-- | src/sam_edit.zig | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/sam_edit.zig b/src/sam_edit.zig index 173a559b..a2db0abc 100644 --- a/src/sam_edit.zig +++ b/src/sam_edit.zig @@ -30,12 +30,6 @@ const regexp = @import("regexp.zig"); const addr_lang = @import("ninep/addr.zig"); const modal = @import("modal.zig"); -/// The next place after `p` a search may start: a rune on, and past the -/// text's end once there, which ends a loop over `p <= end`. -fn stepRune(text: []const u8, p: usize) usize { - return if (p >= text.len) p + 1 else modal.nextRune(text, p); -} - pub const Range = addr_lang.Range; /// A change to the text as it was: `job`, when set, is a `<` or `|` whose @@ -564,6 +558,12 @@ const Parser = struct { const e_noname = "no file name given"; +/// The next place after `p` a search may start: a rune on, and past the +/// text's end once there, which ends a loop over `p <= end`. +fn stepRune(text: []const u8, p: usize) usize { + return if (p >= text.len) p + 1 else modal.nextRune(text, p); +} + const Exec = struct { arena: std.mem.Allocator, why: *Why, |
