From f83bb5b2c8348bd78ba1519e0b4eb0827eb93a1b Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Fri, 5 Apr 2024 13:22:07 -0700 Subject: [PATCH] Use addrule function during parsing --- src/modal.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/modal.c b/src/modal.c index 422519f..fa408d2 100644 --- a/src/modal.c +++ b/src/modal.c @@ -179,14 +179,8 @@ static int parse_line(char *line) { if(line[0] == 0) return 1; - if(line[0] == '<' && line[1] == '>') { - Rule *r = &rules[rules_len++]; - line += 3; - r->a = parse_rulefrag(line); - line = walk(line) + 1; - r->b = parse_rulefrag(line); - return 1; - } + if(line[0] == '<' && line[1] == '>') + return !!addrule(line); while((*prog_++ = *line++)) ; *prog_++ = 0xa;