A pretty common tool for documentation in the FOSS world is Doxygen: https://www.doxygen.nl/index.html