Major refractor

- Add regex search and replace
- Add chunk iterator + update line iterator.
- Cleanup/formatting.
This commit is contained in:
2026-07-29 04:50:22 +01:00
parent d8a59a5f5c
commit 15f1456fac
16 changed files with 759 additions and 256 deletions
+19
View File
@@ -0,0 +1,19 @@
#pragma once
#include "pch.h"
#include "vase/shard.h"
struct RegexGroup {
uint32_t start;
uint32_t end;
bool matched;
};
struct RegexMatch {
uint32_t start;
uint32_t end;
std::vector<RegexGroup> groups{};
};
const std::vector<RegexMatch> regex_search(Shard *root, std::string_view pattern_str, uint32_t start_offset, uint32_t end_offset, uint32_t flags, bool global);
void print_regex(const std::vector<RegexMatch> &matches);