I'm not experienced with BASIC, but QBASIC and GWBASIC seem to be dialects of BASIC with diverging functionality.
Maybe it would be wise to modularize the dialect specific code and make it two separate functions to allow explicitly running BASIC using the .Basic() function and e.g. QBASIC using .QBasic()
var basic = require('wwwbasic')
-- basic.Basic(`
++ basic.QBasic(`
10 PRINT "HELLO WORLD"
20 GOTO 10
`)
Otherwise maybe add an optional option parameter to specify support for certain extensions / dialects / whatever.
var basic = require('wwwbasic')
basic.Basic({ qbasic: true }, `
10 PRINT "HELLO WORLD"
20 GOTO 10
`)
Related to #10 #11 #12 #21