Major updates

- Improve ruby block detection heuristics
- Add block information storage and block aware movements.
- Other minor fixes
This commit is contained in:
2026-08-21 18:34:22 +01:00
parent 739d2e450e
commit 3e3fb6c39d
13 changed files with 298 additions and 133 deletions
+12
View File
@@ -19,6 +19,18 @@ uint64_t Address::resolve(BEd &ctx) {
line = ctx.active->vase.lines();
} else if constexpr (std::is_same_v<T, Number>) {
line = addr.i;
} else if constexpr (std::is_same_v<T, Block>) {
if (addr.dir == Direction::Forward) {
if (ctx.active->parser)
line = ctx.active->parser->next_closing(ctx.active->line);
else
line = ctx.active->line + 10;
} else {
if (ctx.active->parser)
line = ctx.active->parser->prev_opening(ctx.active->line);
else
line = ctx.active->line - 10;
}
} else {
throw ed_error("Unhandled address given.");
}