tbp
tbp copied to clipboard
Look at changing `LanguageItem.value` to only use integers
As Udzu pointed out on the Reddit discussion of tbp, mypy supports type narrowing and that should help eliminate a lot of the cast usage throughout the project.
Originally, I had LanguageItem, the base of all AST types, storing str, int, and None. A while ago I moved all Tiny BASIC string declarations into the PRINT code because that's where it should have been all along. I should look to see if declaring LanguageItem.value as only an int would work and clean up the code.