google / google/wwwbasic

Support for BASIC dialects

Open
#22 4 comments 2 reactions 1 assignee Claimed by @flagxor View on GitHub
Dominant language
JavaScript
Stars
1.2k
Forks
61
PR merge metrics
No merged PRs in 30d

Description

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()`

```diff
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.

```js
var basic = require('wwwbasic')
basic.Basic({ qbasic: true }, `
10 PRINT "HELLO WORLD"
20 GOTO 10
`)
```

Related to #10 #11 #12 #21

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.