Thanks for the encouragement. A couple of years ago I had the opportunity to delve into fcl-passrc, a little-known but very interesting library. Given the almost non-existent documentation, I had a fundamental help from Michael V.C., who was fantastic.
In particular, I conducted an extensive test of the aforementioned parser, even on the most esoteric syntactic forms of freepascal, detecting some bugs that Michael has always fixed, with almost real-time commits.
The version of fcl-passrc currently available with FPC 3.2.2 is therefore not updated and I'm using the one available in trunk. This version is able to parse almost all the syntactic forms described in the user guide (plus some missing ones, such as generic routines, i.e. those that are not class methods, but free standing).
Two years ago I created a library (Pas2XML) that analyzes a freepascal source and generates the syntactic tree, represented in XML format and/or in a tree data structure. I have not disclosed it, but I can do so if anyone is interested.
Now I have planned to create a so-called structured (or contextual) diff for free-pascal. I don't think there are any for it. I'm aware of
https://modelmaker-structured-difference-viewer.software.informer.com/, which is designed for Delphi and doesn't work very well with other fpc syntaxes. Indeed, as well known, structured diffs are not language agnostic.