mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-26 07:16:07 +00:00

The production for a bare file unit number in an I/O statement checks that the scalar integer expression isn't followed by "=", in order to disambiguate FLUSHN from FLUSHN=1, and to not treat a control specifier keyword as an integer expression. The implementation of this check used !"="_tok, which has the side effect of producing no error message; this can lead to a parsing crash later when a failed parse of an erroneous program is found to have produced no errors. Rewrite as a lookAhead call for those characters that acually can follow a bare unit number. Fixes https://github.com/llvm/llvm-project/issues/105779.