Use addrule function during parsing

This commit is contained in:
Devine Lu Linvega 2024-04-05 13:22:07 -07:00
parent 3c99fb47f6
commit f83bb5b2c8
1 changed files with 2 additions and 8 deletions

View File

@ -179,14 +179,8 @@ static int
parse_line(char *line) parse_line(char *line)
{ {
if(line[0] == 0) return 1; if(line[0] == 0) return 1;
if(line[0] == '<' && line[1] == '>') { if(line[0] == '<' && line[1] == '>')
Rule *r = &rules[rules_len++]; return !!addrule(line);
line += 3;
r->a = parse_rulefrag(line);
line = walk(line) + 1;
r->b = parse_rulefrag(line);
return 1;
}
while((*prog_++ = *line++)) while((*prog_++ = *line++))
; ;
*prog_++ = 0xa; *prog_++ = 0xa;