technical dept payed back

This commit is contained in:
anon 2023-09-25 22:35:17 +02:00
parent 8f2fbcdb2b
commit aa3dd43fc5

View File

@ -535,12 +535,6 @@ regex_t * regex_compile(const char * const pattern) {
} break;
}
/* Ew */
if (*s == '\\'
&& is_hologram_escape(*(s+1))) {
++s;
}
// Compile char
switch (*s) {
// holograms
@ -555,6 +549,13 @@ regex_t * regex_compile(const char * const pattern) {
}
s += 1;
} break;
case '\\': {
if(is_hologram_escape(*(s+1))) {
++s;
} else {
goto DEFAULT;
}
switch(*s){
case '<': {
// XXX: make this legible
if (cs.flags & IS_AT_THE_BEGINNING
@ -599,6 +600,8 @@ regex_t * regex_compile(const char * const pattern) {
++cs.state;
s += 1;
} break;
}
} break;
// quantifiers
case '=':
case '?': {
@ -631,6 +634,7 @@ regex_t * regex_compile(const char * const pattern) {
}
s += 1;
} break;
DEFAULT:
default: { // Literal
cs.flags |= INCREMENT_STATE;
HOOK_ALL(0, whitelist, +1, &cs, regex);