Add marks and regex addressing systems

- Hook up parser to buffer edits.
- Other minor fixes.
This commit is contained in:
2026-08-22 15:01:48 +01:00
parent 2a903f761a
commit bea8ff18c0
15 changed files with 357 additions and 73 deletions
+1 -4
View File
@@ -243,15 +243,12 @@ void Parser::modify(vase::Vase &vase, uint64_t target, uint64_t count) {
events.clear();
lang.parse(&state, it.line, at == 0, &tokens, &events);
for (const auto &ev : events) {
const auto t = uint8_t(ev.ev_type);
if (t > ParseEvent::Closing)
continue;
if (c.leaf->n == c.leaf->cap) {
uint32_t cap = c.leaf->cap ? c.leaf->cap * 2 : 8;
c.leaf->blocks = (uint16_t *)realloc(c.leaf->blocks, cap * sizeof(uint16_t));
c.leaf->cap = cap;
}
c.leaf->blocks[c.leaf->n++] = t << 15 | (at - chunk_start);
c.leaf->blocks[c.leaf->n++] = ev.closing << 15 | (at - chunk_start);
}
at++;
}