aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2025-03-09 03:51:11 -0400
committerB. Watson <urchlay@slackware.uk>2025-03-09 03:51:11 -0400
commitaacec9f96fabac88b4b88d0d25bbd93620e7cbfe (patch)
tree4ddad992259e41fcecfa88ce192b72fd62cfdbc8
parentcd18873bdf82b327dfc5f6a15da40ca9f31204c3 (diff)
downloadbw-atari8-tools-aacec9f96fabac88b4b88d0d25bbd93620e7cbfe.tar.gz
listamsb: XXX comment for TOK_ELSE in need_space_between().
-rw-r--r--listamsb.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/listamsb.c b/listamsb.c
index 2581a61..b0ce957 100644
--- a/listamsb.c
+++ b/listamsb.c
@@ -618,6 +618,16 @@ int need_space_between(int ext1, int ext2, unsigned char t1, unsigned char t2) {
if(t2 == TOK_AND) return 1;
if(t2 == TOK_OR) return 1;
if(t2 == TOK_NOT) return 1;
+
+ /* XXX: this isn't ideal. This line:
+ 10 IF A THEN PRINT "OK" ELSE GOTO 100
+ ...gets crunched to:
+ 10 IFATHENPRINT "OK"ELSEGOTO100
+ ...but it decrunches to:
+ 10 IF A THEN PRINT "OK" : ELSE GOTO 100
+ ...which works OK, but the : really shouldn't appear.
+ the trouble is, we only look ahead one token. */
+ if(t2 == TOK_ELSE) return 1;
}
if(isalnum(t1last)) {