aboutsummaryrefslogtreecommitdiff
path: root/tr8as.c
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2023-05-22 23:14:30 +0100
committerJuan J. Martinez <jjm@usebox.net>2023-05-22 23:14:30 +0100
commit5584f79fff0fdfc8e4430eea3867c729b82f4152 (patch)
tree132d287a681fc4b97f7c2932cc28fca79086a41a /tr8as.c
parent5c6d23c0fee17ded445315a0b0ed7afadbf9455f (diff)
downloadtr8vm-5584f79fff0fdfc8e4430eea3867c729b82f4152.tar.gz
tr8vm-5584f79fff0fdfc8e4430eea3867c729b82f4152.zip
Simplified
Diffstat (limited to 'tr8as.c')
-rw-r--r--tr8as.c18
1 files changed, 4 insertions, 14 deletions
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");