summaryrefslogtreecommitdiff
path: root/regex.h
diff options
context:
space:
mode:
authorWormHeamer2026-01-01 04:20:20 -0500
committerWormHeamer2026-01-01 04:20:20 -0500
commitfafa797d33d1e6fd0fa0cee9a8cd7eb90ba85782 (patch)
tree547c072101f9c511232b82d7867216c162100a2f /regex.h
parentd862b833292133948e67bfd39a20d825bc80733e (diff)
regex error reporting
Diffstat (limited to 'regex.h')
-rw-r--r--regex.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/regex.h b/regex.h
index b6ee9c7..c21c708 100644
--- a/regex.h
+++ b/regex.h
@@ -111,8 +111,16 @@ typedef enum {
RE_COMP_NO_GROUPS = 1
} ReCompFlags;
+typedef enum {
+ RE_COMP_ENONE,
+ RE_COMP_ENORPAREN,
+ RE_COMP_ENOLPAREN,
+ RE_COMP_EEOF,
+} ReCompErr;
+
int re_comp(RegEx *re, Str src, Arena *perm, Arena *scratch);
int re_comp_ex(RegEx *re, Str src, Arena *perm, Arena *scratch, ReCompFlags flags);
+const char *re_comp_strerror(ReCompErr err);
void re_search_start(ReSearch *s, RegEx *re, Arena *a);
void re_search_chunk(ReSearch *s, const char *buf, size_t n);