summaryrefslogtreecommitdiffstats
path: root/regex.c
diff options
context:
space:
mode:
Diffstat (limited to 'regex.c')
-rw-r--r--regex.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/regex.c b/regex.c
index 51c95bc4..926ae4fd 100644
--- a/regex.c
+++ b/regex.c
@@ -593,6 +593,11 @@ obj_t *regex_compile(obj_t *regex_sexp)
return cobj(pnfa, regex, &regex_obj_ops);
}
+obj_t *regexp(obj_t *obj)
+{
+ return (obj->co.type == COBJ && obj->co.cls == regex) ? t : nil;
+}
+
nfa_t *regex_nfa(obj_t *reg)
{
assert (reg->co.type == COBJ && reg->co.cls == regex);