Empty string was not matching, which was causing its value to be '""', which
expanded (in JS) into the compiled string '""""'. Oops.
* build-aux/bootstrap/prebirth.js (Parser#_token): Distinguish empty values
from non-matches.
The Prebirth JS compiler is getting much more sophisticated than I had
hoped, but I need something to work with here. This starts to get us
in a good spot.
There are other conveniences I will want. More to come.
* build-aux/bootstrap/prebirth.js
(Compiler#constructor): Add method, accept fnmap.
(Compiler#_sexpToEs): Use fnmap as needed.
(fnmap): Add initial map.
Instantiate `Compiler' with fnmap.
This was implicit in the `define-block' implementation because of the
conversion from `<foo>' to `$foo$', but that's no longer the case.
This is just a simple, temporary implementation, so don't be alarmed.
* build-aux/bootstrap/libprebirth.js: Updated header documentation to
mention `$$' prefix.
($$js$console): Renamed from `js$console'.
* build-aux/bootstrap/prebirth.js
(_idFromName): Add `global' parameter to add `$$' prefix to generated
identifiers.
(_cdfn, _sexpToEs): Use it.
So we can invoke the main function for the program.
* build-aux/bootstrap/prebirth.js
(Compiler#_cdfn): Handle non-`define' applications.
(Compiler#assertApply): Remove function.
Turns out, I'll kill myself before writing a Prebirth compiler in a
block-define-based Prebirth Lisp. So, let's degrade even further into a
primitive Scheme. This is going down a dangerous path to simply
implementing Scheme...
Nonetheless, here I remove `define-block' in favor of a simple shorthand
function definition `define', as is custom in Scheme. We will worry
about block definitions later as metadata mapping to normal functions.
This is hopefully the beginning of a good thing that I'll actually
finish. I began planning this project formally just before the beginning of
Aug 2017.
* build-aux/bootstrap/prebirth.js: New file.