tbp icon indicating copy to clipboard operation
tbp copied to clipboard

Look at changing `LanguageItem.value` to only use integers

Open John-Robbins opened this issue 1 year ago • 0 comments

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.

John-Robbins avatar Sep 16 '24 21:09 John-Robbins