If anyone would be helped by an example, I worked on this recursive descent-based compiler a few years ago with a focus on clarity and readability:
https://github.com/rzimmerman/kal
The actual parsing is here: https://github.com/rzimmerman/kal/blob/master/source/grammar...
It's somewhere between a toy language and something professional, so it could be a helpful reference if you're doing this for the first time.
Beware, the project is no longer maintained and probably doesn't work with modern node.js runtimes.