This must mean that something like:
#if(ANDROID) && !(WINDOWS)
Should not be correct as '(' is not defined in whitespace, which is mandatory in the specification:
whitespace
: '<Any character with Unicode class Zs>'
| '<Horizontal tab character (U+0009)>'
| '<Vertical tab character (U+000B)>'
| '<Form feed character (U+000C)>'
;
However this will pass in the .NET compiler.
So it seems like an : whitespace? '#' whitespace? 'if' can be followed by a '!', '(' or a whitespace.
Following this specification as seen in here: https://github.com/dotnet/csharplang/blob/master/spec/lexical-structure.md For preprocessor directive it is specified that this is the specification:
This must mean that something like:
#if(ANDROID) && !(WINDOWS)
Should not be correct as '(' is not defined in whitespace, which is mandatory in the specification:However this will pass in the .NET compiler.
So it seems like an
: whitespace? '#' whitespace? 'if'
can be followed by a '!', '(' or a whitespace.