diff options
author | B. Watson <urchlay@slackware.uk> | 2024-07-07 05:05:38 -0400 |
---|---|---|
committer | B. Watson <urchlay@slackware.uk> | 2024-07-07 05:05:38 -0400 |
commit | d34148b6aa1948d42373c290cc168df015978de4 (patch) | |
tree | 8e5dae2d1af6bacbf369196e8c7532fc4a7355b4 | |
parent | 96dc62e466855ba951ea4d89f75e7f081af02987 (diff) | |
download | bw-atari8-tools-d34148b6aa1948d42373c290cc168df015978de4.tar.gz |
whichbas: add partial support for EXOR/BUMP( op.
-rw-r--r-- | whichbas.c | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -284,6 +284,23 @@ CALLBACK(handle_op) { } /* 5a: EXOR (infix num op) or BUMP( (pseudo-function, no OP_FUNC_LPAR) */ + if(tok == 0x5a) { + /* XXX: incomplete */ + if(last_cmd_pos == pos - 1) { + /* partial: if the last token was a command, this *can't* + be EXOR (it's infix). */ + remove_type(BT_TURBO); + /* this won't quite work: */ + /* } else if(program[pos - 1] == OP_NUM_ASSIGN) { + remove_type(BT_TURBO); */ + } else if(program[pos - 1] >= 0x80) { + /* partial: if the last token was a variable, this can't + be BUMP (it's a function, last token has to be a command + or a regular operator). however, Turbo BASIC allows up to 256 + variables, this only catches the first 128. */ + remove_type(BT_BXL_BXE); + } + } /* 5b: HEX$ (func, takes 1 num arg) or FIND( (pseudo-func, 3 args */ if(tok == 0x5b) { |