[fcl-passrc][patch] (. and .) as replacement for square braces are not parsed
Original Reporter info from Mantis: jc99
-
Reporter name: Joe care
Original Reporter info from Mantis: jc99
- Reporter name: Joe care
Description:
parsing code with (. and .) as replacement for [ and ] gives an error in pparser.
Steps to reproduce:
[code]
const c:array(.0..1.) of byte = (1,2); begin write(c(.0.)); end.
[/code]
compiles fine with fpc
but gives an error when parsing with passrc
Additional information:
There are two ways to fix this:
First the scanner takes (. and .) and produces tkSqareBraceOpen and tSquareBraceClose. This defintly fixes the error and would give a correct program, regresion: the pasTree of the parser would not fully represent the code and paswrite would write a sightly different program than the original.
Better solution the scanner gets two new tokens e.G: tkBraceDotOpen and tkDotBraceClose. But then all other programs had to handle those new tokens.
... so I went for the first solution.
Mantis conversion info:
- Mantis ID: 37807
- OS: Win64
- OS Build: 10
- Build: latest
- Platform: x86-64
- Version: 3.3.1
- Fixed in version: 3.3.1
- Fixed in revision: 46937 (#0ef66a86)
- Target version: 3.2.2