diff options
author | Juan J. Martinez <jjm@usebox.net> | 2023-05-22 23:14:30 +0100 |
---|---|---|
committer | Juan J. Martinez <jjm@usebox.net> | 2023-05-22 23:14:30 +0100 |
commit | 5584f79fff0fdfc8e4430eea3867c729b82f4152 (patch) | |
tree | 132d287a681fc4b97f7c2932cc28fca79086a41a /tr8as.c | |
parent | 5c6d23c0fee17ded445315a0b0ed7afadbf9455f (diff) | |
download | tr8vm-5584f79fff0fdfc8e4430eea3867c729b82f4152.tar.gz tr8vm-5584f79fff0fdfc8e4430eea3867c729b82f4152.zip |
Simplified
Diffstat (limited to 'tr8as.c')
-rw-r--r-- | tr8as.c | 18 |
1 files changed, 4 insertions, 14 deletions
@@ -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"); |