Do not walk whitespace on create_rule
This commit is contained in:
parent
8bdb791365
commit
5249d7612d
|
@ -163,7 +163,6 @@ create_rule(Rule *r, int id, char *s)
|
|||
char c;
|
||||
r->id = id, s += 2;
|
||||
r->a = dict_, s = parse_frag(s), r->b = dict_, s = parse_frag(s);
|
||||
while((c = *s) && c <= ' ') s++;
|
||||
return s;
|
||||
}
|
||||
|
||||
|
@ -178,6 +177,7 @@ rewrite(void)
|
|||
if(s[0] == '<' && s[1] == '>') {
|
||||
r = rules_++;
|
||||
s = create_rule(r, rules_ - rules - 1, s);
|
||||
while((c = *s) && c <= ' ') s++;
|
||||
return commit_rule(r, s, 1);
|
||||
}
|
||||
if(s[0] == '?' && s[1] == '(') {
|
||||
|
|
Loading…
Reference in New Issue