I've updated all my PRs over on the GitHub repo. They fix up various things, mostly cosmetic, and provide smaller and easier-to-validate changes instead of trying to post my entire cleanup effort at once.
The source code can be simplified and reduced in size a lot, so that is my focus on the first pass. For the second pass, it seems worthwhile to refactor the code into C++ with STL, as STL can simplify a lot of things, such as working with strings and data structures. I understand there are some other bAtari-BASIC implementations floating around out there, at least one built in (or converted to) Javascript. And maybe the Rust gurus out there will want to take a stab at it someday….
The coolest part about having a Javascript implementation will be to see the bAtari-BASIC source code in one edit field, and the resulting ASM code showing up in real-time in the other field. Combined with a 6502 compiler and a web-based Stella… It will be a much more immediate and fun way to work with this language. And, more nerds playing with this platform might generate some interest in making new and better kernels.
As always, I hope my contributions are useful to someone, and I'll continue to submit improvements as time allows. Cheers!