Use addrule function during parsing
This commit is contained in:
parent
3c99fb47f6
commit
f83bb5b2c8
10
src/modal.c
10
src/modal.c
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue