-
-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot parse rtl\sys\System.Types.pas #171
Comments
PasDoc's ability to parse and evaluate compiler defines are quite simple and limited so such complex conditions could likely behave weird. Anyway, how could we know what the issue is without failing source fragment? |
Yes, I see. In the System units there are a lot of compiler directives. It seems rather impossible to find out what exactly causes the issue. Thanks, I will close this incident. |
Tl;dr: I have reproduced the issue and made a small testcase, attaching. Longer version: As I had access to Delphi 11, I could reproduce the fail. It's a bit different Delphi version and different line number, but looks similar enough to suspect that it's the same culprit. And it is not related to I experienced this fail:
Looking at the faulty line of code (1167), PasDoc fails to process a nested record in a peculiar case. Playing around, I was able to cut it down to trivial testcase, that is also hopefully so small and meaningless that publishing it here falls under "fair use" and doesn't make problems because of Delphi copyright. I'm attaching it here, and reopening this issue. This is valid issue, and now we have a reproduction, and when someone will find time -- it should be fixed in (likely in @Fr0sT-Brutal Please let's be a bit more encouraging to users who submit bugreports.
Just as an example for next time, a better answer would be like this: """
|
I just wonder whether this issue can be solved with the Delphi compiler. Let me explain. In the programming language C there is something called preprocessor. This tool evaluates all the directives (#if, #define) and outputs the resulting pure C code. |
It would indeed be nice if Delphi or FPC included something that acts "just as a preprocessor", similar to C language Related: We actually provide such preprocessor as part of PasDoc :) Our tool See https://pasdoc.github.io/OtherTools . Alas, as you probably guess, |
I try to parse file
System.Types.pas
on Windows 11 using this commandpasdoc --format simplexml --output output "C:\Program Files (x86)\Embarcadero\Studio\19.0\source\rtl\sys\System.Types.pas"
Following infos and warnings are shown:
No xml is created. How can I get the XML output for this unit?
The text was updated successfully, but these errors were encountered: