Here’s what we’ll add to our basic language in this tutorial. (This is also the point when our implementation stop resembling traditional BASIC, so purists may want to look away.)
We’ll add the def statement, which will let us create callable functions.
We’ll support imports from existing Racket libraries by adding an import statement that’s equivalent to Racket’s require.
We’ll alter our language so every program automatically exports its defined functions and variables.
We’ll see how to reprogram the REPL to understand BASIC-style statements and expressions.
For fun, we’ll see how we can handle shell input.
We’ll start with the code we were left with at the end of the previous tutorial. We’ll also assume that we’ve created a basic directory and installed it as a package as described in the first specification and setup.