From 45ab88611e74a4bbddc3f666390e142c404669c3 Mon Sep 17 00:00:00 2001 From: Steven Hugg Date: Wed, 12 Aug 2020 11:57:54 -0500 Subject: [PATCH] basic: RANDOMIZE, WHILE/WEND, RESTORE line, BASIC80 (17, 56, 67) --- src/common/basic/compiler.ts | 174 +++++++++++++++++++++++++++++------ src/common/basic/run.ts | 13 ++- src/common/basic/runtime.ts | 155 ++++++++++++++++++++++++++----- src/platform/basic.ts | 1 + 4 files changed, 287 insertions(+), 56 deletions(-) diff --git a/src/common/basic/compiler.ts b/src/common/basic/compiler.ts index 0de545ac..2b5eefbb 100644 --- a/src/common/basic/compiler.ts +++ b/src/common/basic/compiler.ts @@ -33,7 +33,9 @@ export interface BASICOptions { // CONTROL FLOW testInitialFor : boolean; // can we skip a NEXT statement? (can't interleave tho) optionalNextVar : boolean; // can do NEXT without variable - ifElse : boolean; // IF...ELSE construct + multipleNextVars : boolean; // NEXT J,I + checkOnGotoIndex : boolean; // fatal error when ON..GOTO index out of bounds + restoreWithLabel : boolean; // RESTORE