This looks promising: https://stackoverflow.com/questions/64527150/in-typescript-how-to-select-a-type-from-a-union-using-a-literal-type-property or following what `ts-pattern` does. Apply this to [parse.ts](https://github.com/rlivings39/learning-compilers/blob/main/src/parse.ts)
This looks promising:
https://stackoverflow.com/questions/64527150/in-typescript-how-to-select-a-type-from-a-union-using-a-literal-type-property
or following what
ts-patterndoes.Apply this to parse.ts