aboutsummaryrefslogtreecommitdiff
path: root/whichbas.c
diff options
context:
space:
mode:
Diffstat (limited to 'whichbas.c')
-rw-r--r--whichbas.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/whichbas.c b/whichbas.c
index 035afb5..7c65355 100644
--- a/whichbas.c
+++ b/whichbas.c
@@ -270,6 +270,7 @@ CALLBACK(handle_cmd) {
}
break;
case 0x59: /* TEXT or PROCEDURE */
+ /* COMPLETE */
/* Turbo: TEXT (1st arg is number),
BXL: invalid token,
BXE: PROCEDURE (arg is string const (not var!)) */
@@ -286,6 +287,7 @@ CALLBACK(handle_cmd) {
case 0x45: /* DO or TAB <args> */
case 0x47: /* EXIT or ERASE <args> */
case 0x51: /* ENDPROC or PMMOVE <args> */
+ /* COMPLETE */
if(has_args) {
remove_type(BT_TURBO);
} else {
@@ -308,11 +310,13 @@ CALLBACK(handle_cmd) {
break;
case 0x3b: /* *F (optional + or -), TRACE (no arg) */
case 0x5e: /* *B (optional + or -) or EXIT (no arg) */
+ /* partial: doesn't catch *F or *B by itself with no +/- */
if(has_args) {
remove_type(BT_BXL_BXE);
}
break;
case 0x44: /* FILLTO or BGET (check for a # after the token) */
+ /* COMPLETE */
if(nexttok == OP_HASH) {
remove_type(BT_TURBO);
} else {
@@ -320,6 +324,9 @@ CALLBACK(handle_cmd) {
}
break;
case 0x4e: /* TIME$= (1 string arg) or PMCLR (1 num arg) */
+ /* partial: but almost complete. nothing happens if it's
+ TIME$= with a string function (probably rare) or PMCLR
+ with a complex expression. */
if(nexttok == OP_STRCONST) {
remove_type(BT_BXL_BXE);
} else if(has_var_arg && vartype == TYPE_STRING) {
@@ -450,20 +457,12 @@ CALLBACK(handle_op) {
0x64 RAND (func, 1 num arg) or TAB (func, 1 num arg), can't tell apart
0x65 TRUNC (func, 1 num arg) or PEN (func, 1 num arg), can't tell apart
*/
-
switch(tok) {
case 0x55: /* DPEEK (function) TB, USING (infix, not a function) in BXL/BXE */
- case 0x58: /* INSTR (function) or & (infix numeric) in BXE. Note that
- BXL has this as another END token, which works like the
- regular END, but cannot be entered in the editor so unlikely
- to show up in a program (but we handle it here anyway) */
+ case 0x58: /* INSTR (function) or & (infix numeric) in BXE. */
case 0x5b: /* HEX$ (func, takes 1 num arg) or FIND( (pseudo-func, 3 args */
if(nexttok == OP_FUNC_LPAR) {
remove_type(BT_BXL_BXE);
- } else if(nexttok == OP_EOS || nexttok == OP_EOL) {
- /* weird BXL END token (0x58). the other 2 (0x55, 0x5b) can't
- show up at the end whether they're TB or BXL/BXE. */
- remove_type(BT_TURBO | BT_BXE);
} else {
remove_type(BT_TURBO);
}