Setup cli routing & other cleanup.
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#include "pch.h"
|
||||
|
||||
namespace crib::cli {
|
||||
extern bool use_colors;
|
||||
void help();
|
||||
int run(int argc, char *argv[]);
|
||||
} // namespace crib::cli
|
||||
@@ -1,3 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "pch.h"
|
||||
@@ -2,3 +2,9 @@
|
||||
|
||||
#include "internal/vase/vase.h"
|
||||
#include "pch.h"
|
||||
|
||||
namespace crib::commands::ed {
|
||||
std::string summary();
|
||||
void help();
|
||||
void run(int argc, char *argv[]);
|
||||
} // namespace crib::commands::ed
|
||||
|
||||
@@ -18,28 +18,28 @@ struct Range {
|
||||
Point end;
|
||||
};
|
||||
|
||||
struct RegexGroup {
|
||||
uint64_t start{UINT32_MAX};
|
||||
uint64_t end{UINT32_MAX};
|
||||
};
|
||||
|
||||
struct RegexMatch {
|
||||
uint64_t start;
|
||||
uint64_t end;
|
||||
RegexGroup groups[9]{};
|
||||
};
|
||||
|
||||
struct ReplacePart {
|
||||
enum struct PartType {
|
||||
FullMatch,
|
||||
CaptureGroup,
|
||||
Constant
|
||||
} type;
|
||||
|
||||
std::variant<uint8_t, Shard *> value;
|
||||
};
|
||||
|
||||
struct Vase {
|
||||
struct RegexGroup {
|
||||
uint64_t start{0};
|
||||
uint64_t end{0};
|
||||
};
|
||||
|
||||
struct RegexMatch {
|
||||
uint64_t start;
|
||||
uint64_t end;
|
||||
RegexGroup groups[9]{};
|
||||
};
|
||||
|
||||
struct ReplacePart {
|
||||
enum struct PartType {
|
||||
FullMatch,
|
||||
CaptureGroup,
|
||||
Constant
|
||||
} type;
|
||||
|
||||
std::variant<uint8_t, Shard *> value;
|
||||
};
|
||||
|
||||
OriginalBuffer *original;
|
||||
AppendBuffer *append;
|
||||
Shard *root;
|
||||
|
||||
Reference in New Issue
Block a user