Improvements with regex system.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user