[flang] Accomodate historic preprocessing usage (#78868)
Some Fortran codes use line continuation as a form of token pasting; see https://github.com/llvm/llvm-project/issues/78797. This works in compilers that run a C-like preprocessor and then apply line continuation to its output; f18 implements line continuation during tokenization and preprocessing, but can still handle this case. In the rare case when an identifier is split across two or more continuation lines, this patch allows its parts to be distinct preprocessing tokens for the purpose of macro replacemnt. They (or their replacement texts) can be effectively rejoined later as a single identifier when the cooked character stream is tokenized in parsing. Fixes https://github.com/llvm/llvm-project/issues/78797.
parent
6ac392b9
Please register or sign in to comment