From 56b692064dccfac72295273166176115e66e52ba Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Sun, 7 Jul 2024 17:02:25 -0400 Subject: whichbas: handle undocumented extra END token in BASIC XL. --- whichbas.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/whichbas.c b/whichbas.c index 75867e1..e05fcd5 100644 --- a/whichbas.c +++ b/whichbas.c @@ -275,10 +275,16 @@ CALLBACK(handle_op) { switch(tok) { case 0x55: /* DPEEK (function) TB, USING (infix, not a function) in BXL/BXE */ - case 0x58: /* INSTR (function) or & (infix numeric) */ + 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 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 */ + remove_type(BT_TURBO | BT_BXE); } else { remove_type(BT_TURBO); } -- cgit v1.2.3