summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2020-03-13 10:29:47 -0400
committerJakob Kaivo <jkk@ung.org>2020-03-13 10:29:47 -0400
commit748c92100567a8617941a30343605bc663bf4810 (patch)
tree01c7288ac36ce31a3cc5280512e0e815790c033e
parent348cc491130b1a861d4ed86c8515adc37b6427e2 (diff)
skip blank lines
-rw-r--r--lex.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lex.c b/lex.c
index 0cdd1c4..6923b20 100644
--- a/lex.c
+++ b/lex.c
@@ -169,6 +169,11 @@ struct parser *parse(struct parser *parser, const char *file)
}
line++;
+ /* skip blank lines */
+ if (buf[0] == '\n') {
+ continue;
+ }
+
if (section == DEFINITIONS) {
if (!strcmp("%%\n", buf)) {
section = RULES;