What I want is to completely replace Babylon with a custom parser. Or, to put it another way, I just want to generate a BabelJS AST from scratch, complete with source-maps.
Is there any documentation on creating ASTs from scratch with all the same output-functionality
as Babylon? I'm particularly interested in source-maps, but I'll probably need all the same functionality as Babylon in terms of the output AST.
Note: I've read the discussions on custom-syntax plugins for babylon, and I see that has generally been turned down. This question is fundamentally different: what's the best way to replace Babylon, not augment it.