Open aibaars opened 2 years ago
I suppose we can fix this by changing the scanner to allow a space after a "block_ampersand" in cases where bitwise-and operators are not expected. Something like !(valid_symbols[BITWISE_AND] && iswspace(lexer->lookahead))
could perhaps work.
Originally reported by @grajagandev at https://github.com/github/codeql/issues/9313
The cause of the problem is that the scanner does not allow a space after a "block ampersand". I can make the examples work by removing the space after the
&
. The following parse fine:Removing the scan check in the scanner, however, causes other problems as it is intended to disambiguate between "bitwise-and" and "block argument" expressions. For example: