It does not like to be applied to include files:
Info[2]: Now parsing file data/xquery_schemas.inc... Warning[2]: Error EPasDoc: data/xquery_schemas.inc(2): reserved word "library" expected but reserved word "const" found while parsing unit xquery_schemas.inc, continuing... Info[2]: Now parsing file data/xquery_types.inc... Warning[2]: Error EPasDoc: data/xquery_types.inc(1): reserved word "library" expected but reserved word "class" found while parsing unit xquery_types.inc, continuing... Info[2]: Now parsing file data/xquery_functions_generated_template.inc... Warning[2]: Error EPasDoc: data/xquery_functions_generated_template.inc(1): reserved word "library" expected but reserved word "function" found while parsing unit xquery_functions_generated_template.inc, continuing...
That is normal. Just like a compiler, PasDoc expects to see something complete --- usually a unit, or a library or a program. Not only our parser wants to start at a defined place (beginning of unit/program/etc), we also want to place the identifier inside a unit to put it nicely in a documentation page, search for it (@link(UnitName.IdentifierName)) and so on.
I guess we could create a "fake" unit for the sake of an include file, but the usefullness of this seems limited to me? In special cases, you can always create such unit (wrapping include file, like
Can you explain your use-case in more detail, why/how do you need this?:) Thanks!
Last edit: Michalis Kamburelis 2015-11-08
It shpuld know from the file extension that it probably is an include file
I have a script that calls pasdoc on all the source files in the project. And the include files are also source files
You mean silently ignore the files with .inc extension? I would not want this --- I prefer the program to fail with error in case of invalid parameters.
Also, I would prefer to avoid looking at file extension to detect it's type, is possible...people use various extensions for Pascal files (not only .pas .lpr, but also .p, .pp. ...).
It sounds like your script should just not pass xxx.inc files to PasDoc command-line? You know what extensions do you use, so just pass only *.pas files to PasDoc, not *.inc *.pas .
Closing -- not a bug in PasDoc, we do not parse include files indeed:)