pg-basic
pg-basic copied to clipboard
Goals
- Based on Vintage/Classic Basic
- Creative programming primitives: Drawing & Sound
- Inspiration: Vintage Basic, Atari Microsoft Basic, and Quite Basic
- Line-based interpreter: i.e. every line is a syntactally complete statement
Architecture
- Line (string) => Lexer => [] Tokens => Parser => AST
- Expressions are precompiled to JavaScript expressions
- Runtime library
basic.js
handles execution, debugging, and context - AST nodes run themsleves
TODO
- Strinct expression parsing (e.g.
3 XX
should not be acceptable) - Nonsense errors:
SQRT
,a[0]
- pass rgb array to plot
- implement mouse getpos
- test/fix repl
- should round plot calls
- don't queue keys while paused
Docs
Moved here.