^C prefixed to string constants causes fpdoc (and fcl-passrc) to fail
Original Reporter info from Mantis: jouborg
-
Reporter name: Joubert Nel
Original Reporter info from Mantis: jouborg
- Reporter name: Joubert Nel
Description:
Some source files contain string constants where the value is prefixed with the literal text ^C, causing fpdoc and fcl-passrc to fail.
When these declarations are encountered:
a) fpdoc skips over the rest of the file
b) my use of fcl-passrc triggers an access violation (I'm still trying to track down how I can safely handle this case)
c) fpc compiles without error and the resulting code runs fine.
For example, fpcsrc/3.2.0/packages/ide/fptools.pas contains:
const msg_errorparsingparametersatpos = ^C'Error parsing parameters line at line position %d.';
Also asked in the forums & got some replies including:
a) why do some of the source files contain this pattern?
b) can fcl-passrc / fpdoc be improved to handle this case (if this syntax is valid)
https://forum.lazarus.freepascal.org/index.php/topic,52678.0.html
Steps to reproduce:
Declaration:
const msg_errorparsingparametersatpos = ^C'Error parsing parameters line at line position %d.';
Additional information:
Attached is a minimal example:
a) console app that uses two units:
- ParseIssue.pas (contains constant string with ^C prefix)
- ParseNonIssue.pas
b) directory containing fpdoc output by running "fpdoc --package-name=caretC --input-dir=."
Mantis conversion info:
- Mantis ID: 38269
- Version: 3.2.0
- Fixed in version: 3.3.1
- Fixed in revision: 47889
- Monitored by: » jouborg (Joubert Nel)
- Target version: 3.2.2