fcl-passrc cannot parse C-style assignment operators like +=
Original Reporter info from Mantis: Michalis @michaliskambi
-
Reporter name: Michalis Kamburelis
Original Reporter info from Mantis: Michalis @michaliskambi
- Reporter name: Michalis Kamburelis
Description:
fcl-passrc cannot parse assignments like "Foo += 2;".
Adding -Sc to the parameter FPCCommandLine of ParseSource procedure, or adding {COPERATORS ON} in the source code, doesn't result in these being allowed. Looking at fcl-passrc code, it seems that -Sc and {
COPERATORS ON} are ignored. In any case, fcl-passrc could probably just parse them automatically always, without requiring -Sc or {$COPERATORS ON}.
$ fpc c_assignment.pas
# compiles Ok
$ fpc test_parser.lpr
$ ./test_parser c_assignment.pas
An unhandled exception occurred at $0809676E:
EParserError: Identifier expected at token "=" in file c_assignment.pas at line 8 column 8
Mantis conversion info:
- Mantis ID: 22007
- OS: Debian GNU/Linux
- OS Build: (testing)
- Platform: i386
- Fixed in version: 3.0.0
- Fixed in revision: 22136 (#c9e622b5)
- Target version: 2.6.1