fcl-passrc parser does not recognize private keyword in record type definition
Original Reporter info from Mantis: hinst
-
Reporter name:
Original Reporter info from Mantis: hinst
- Reporter name:
Description:
I created example project which demonstrates buggy behavior; I attach it to this bug report. However I have to admit that this is more like unimplemented feature than bug.
Steps to reproduce:
Observe this code:
type
TCoolRecord = packed record
private
FField: Integer;
end;
It is possible to compile this code in Delphi mode; however it is not possible to parse it using fcl-passrc library. Even if I enable Delphi mode:
scanner.Options := scanner.Options + [po_delphi];
parser.Options := parser.Options + [po_delphi];
I get an excpetion:
EParserError : Expected "," or ":" at token "Identifier FField" in file Unit1.pas at line 13 column 10
To reproduce this try running attached project
Additional information:
Please fix this if it's not too much work;
I use fcl-passrc to parse source code of a Delphi project which I am working on; I created a small utility app; however I get lots of parser failures. For example in one of my projects I have 143 pascal units; 23 of these units cause fcl-passrc parser to throw exception: either parser exception on access violation; another project has about 500 pascal units; and 150 of these units cause parser failures; however Delphi 2007 can compile all these units
Mantis conversion info:
- Mantis ID: 25704
- Version: 2.6.3
- Fixed in version: 3.0.0
- Fixed in revision: 26749 (#42db0408)
- Target version: 3.0.0