Open comintern opened 6 years ago
I can confirm that the "inappropriate platform" code is highlighted in red in my environment, as well.
Win10, Office2016 - the #If Win64
code looks fine, then #Else
code is in red.
(I'd post an actual sample, but since we've all "upgraded" to Win10/O2016, there was no real need to keep it.)
Just for record, as mentioned via chat, the red highlighting is expected behavior.
On VBA6 and prior hosts, the Declare
statements with PtrSafe
will light up red because it's unknown keyword.
On 32-bit VBA7 hosts, both type of Declare
statements are valid.
On 64-bit VBA7 hosts, the Declare
statements without PtrSafe
will light up red because 64-bit VBA requires PtrSafe
keyword to be present.
With correct compilation arguments, those won't be issues with compiling the codebase since the red section will also be dead.
Adjusted the title to indicate that only the SLL parser fails but not the LL one. Thus, this only impacts the parsing performance.
I was looking for a beast of a module to use for isolating inspection issues and downloaded the spreadsheet from #2476. By complete coincidence, it contained the module (or at least the function) that @FreeMan was having issues with this morning in chat. I logged the following when it parsed:
The full module is attached below (note that it is stored as .txt) to make sure it doesn't get "fixed" with a pull on either repo:
What makes this particularly interesting is how the precompiler directives are arranged at the the start of the module, because they confuse the hell out of the VBE. It highlights them as syntax errors, but it compiles cleanly:
I think this raises the possibility that RD's parser is similarly confused, so this should be investigated.