Housekeeping

This commit is contained in:
Devine Lu Linvega 2024-04-24 13:49:21 -07:00
parent bcbfe02783
commit 9d4d20e542
1 changed files with 2 additions and 3 deletions

View File

@ -213,14 +213,13 @@ rewrite(void)
Rule *r = NULL; Rule *r = NULL;
if(c == '<' && s[1] == '>') { /* rule */ if(c == '<' && s[1] == '>') { /* rule */
r = rules_++; r = rules_++;
s = compile_rule(r,rules_ - rules - 1, s + 2); s = compile_rule(r, rules_ - rules - 1, s + 2);
while(*s == ' ') s++; while(*s == ' ') s++;
return write_rule(r, s, 1); return write_rule(r, s, 1);
} }
if(c == '?' && s[1] == '(') { /* lambda */ if(c == '?' && s[1] == '(') { /* lambda */
cap = walk(s + 1); cap = walk(s + 1);
r = &lambda; compile_rule(&lambda, -1, s + 2);
compile_rule(r, -1, s + 2);
s = cap; s = cap;
while(*s == ' ') s++; while(*s == ' ') s++;
return apply_rule(&lambda, s); return apply_rule(&lambda, s);