I've used freepascal's Pscanner, PParser, PasTree and based on outpaswrite made a json output for processing pascal source types (focused mostly on classes):
https://github.com/JernejL/pascal_rtti_json There is still a fair amount of cleanup that has to be done, mostly redundant part leftover from outpaswrite code this is based on.
In current form it is good enough for my basic use - which is to use a intermediate python script to auto-generate wrapper classes for my game to use with besen javascript engine (
https://github.com/BeRo1985/besen ). This has to be done manually each time something is updated, but it gets stuff done.