Improvements with regex system.

This commit is contained in:
2026-07-29 16:40:08 +01:00
parent b10f1291a0
commit 89b24a7488
6 changed files with 117 additions and 132 deletions
+4 -6
View File
@@ -4,20 +4,18 @@
#include "vase/shard.h"
struct RegexGroup {
uint32_t start;
uint32_t end;
bool matched;
uint32_t start{UINT32_MAX};
uint32_t end{UINT32_MAX};
};
struct RegexMatch {
uint32_t start;
uint32_t end;
std::vector<RegexGroup> groups{};
RegexGroup groups[9]{};
};
const std::vector<RegexMatch> regex_search(
std::vector<RegexMatch> regex_search(
Shard *root, std::string_view pattern_str,
uint32_t start_offset, uint32_t end_offset,
std::string_view options
);
void print_regex(const std::vector<RegexMatch> &matches);