From d3c1526f71a083b98b7ac8833434cd0347d8fc7f Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 1 Aug 2021 13:41:13 -0700 Subject: Cleanup of space/line skipping code --- definitions.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'definitions.c') diff --git a/definitions.c b/definitions.c index 8216e1d..43bfe3c 100644 --- a/definitions.c +++ b/definitions.c @@ -33,8 +33,7 @@ def_t *with_def(def_t *defs, size_t namelen, const char *name, pat_t *pat) // def_t *load_grammar(def_t *defs, file_t *f) { - const char *str = after_spaces(f->start); - while (*str == '\r' || *str == '\n') str = after_spaces(++str); + const char *str = after_spaces(f->start, true); pat_t *pat = bp_pattern(f, str); if (!pat) file_err(f, str, f->end, "Could not parse this file"); if (pat->end < f->end) file_err(f, pat->end, f->end, "Could not parse this part of the file"); -- cgit v1.2.3