44 fprintf(stderr,
"Runtime type error: REGEX_MATCH expects (string, string)\n");
65 int ok = regexec(&rx,
str.s ?
str.s :
"", 1, &
m, 0) == 0;
69 if (
m.rm_so == 0 &&
str.s) {
70 size_t slen = strlen(
str.s);
71 truth = (
m.rm_eo == (regoff_t)slen) ? 1 : 0;
push_value(vm, make_int(truth))
Tagged union representing a Fun value.
Value make_int(int64_t v)
Construct a Value representing a 64-bit integer.
static Value pop_value(VM *vm)
Pop a Value from the VM operand stack.