From 5584f79fff0fdfc8e4430eea3867c729b82f4152 Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Mon, 22 May 2023 23:14:30 +0100 Subject: Simplified --- tr8as.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'tr8as.c') diff --git a/tr8as.c b/tr8as.c index dd2c160..40042fd 100644 --- a/tr8as.c +++ b/tr8as.c @@ -1562,12 +1562,8 @@ static uint8_t parse(As *as, char *c) c = skip_whitespace(c); - /* comment */ - if (*c == ';') - return 1; - - /* empty line */ - if (!*c) + /* comment or empty line */ + if (!*c || *c == ';') return 1; if (!next_word(as, &c, word)) @@ -1595,16 +1591,10 @@ static uint8_t parse(As *as, char *c) return error_l("Parse error", &as->loc, word); } - /* can be followed by a comment or EOL */ - c = skip_whitespace(c); - /* comment */ - if (*c == ';') - return 1; - - /* EOL */ - if (!*c) + /* comment or EOL */ + if (!*c || *c == ';') return 1; return error_l("Parse error", &as->loc, "expected end of line"); -- cgit v1.2.3