Don't take this the wrong way, but my understanding was that you're vibe coding it?
If that's the case I'd do this from day 1, your parser should be a 1 to 1 mapping of some text to code, this you can easily and rigourously test, then if you want to, you can do other stuff on top