you should be able to parse the abstract syntax tree and just look at top level definitions to get a good overview.