Setup cli routing & other cleanup.

This commit is contained in:
2026-08-06 23:21:38 +01:00
parent 04a27b30aa
commit fdb67b449d
9 changed files with 135 additions and 28 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
#include "internal/vase/vase.h"
namespace crib::internal::vase {
std::vector<ReplacePart> Vase::parse_replace(std::string_view s) {
std::vector<Vase::ReplacePart> Vase::parse_replace(std::string_view s) {
std::vector<ReplacePart> parts;
std::string constant;
auto flush_constant = [&]() {
@@ -100,7 +100,7 @@ void Vase::regex_search_replace(
uint8_t idx = std::get<uint8_t>(part.value);
if (idx <= 9) {
const RegexGroup &group = match.groups[idx - 1];
if (group.start != UINT32_MAX) {
if (group.start > group.end) {
uint64_t ls = group.start - match.start;
uint64_t le = group.end - match.start;
auto [a, b] = Shard::split(dropped, ls);
+1 -1
View File
@@ -1,7 +1,7 @@
#include "internal/vase/vase.h"
namespace crib::internal::vase {
std::vector<RegexMatch> Vase::_regex_search(
std::vector<Vase::RegexMatch> Vase::_regex_search(
std::string_view pattern, Range range, std::string_view options
) {
bool global = false;