[flang-commits] [flang] [flang][parser] handle semicolons uniformly in program unit constructs (PR #181180)
Peter Klausler via flang-commits
flang-commits at lists.llvm.org
Thu Mar 5 08:19:58 PST 2026
================
@@ -86,14 +86,14 @@ static constexpr auto globalOpenACCCompilerDirective{
// Consequently, a program unit END statement should be the last statement
// on its line. We parse those END statements via unterminatedStatement()
// and then skip over the end of the line here.
-TYPE_PARSER(
- construct<Program>(extension<LanguageFeature::EmptySourceFile>(
- "nonstandard usage: empty source file"_port_en_US,
- skipStuffBeforeStatement >> consumedAllInput >>
- pure<std::list<ProgramUnit>>()) ||
- some(globalCompilerDirective || globalOpenACCCompilerDirective ||
- normalProgramUnit) /
- skipStuffBeforeStatement))
+TYPE_PARSER(construct<Program>(skipStuffBeforeStatement >>
----------------
klausler wrote:
The comment block before this parser now seems incorrect; please update it.
https://github.com/llvm/llvm-project/pull/181180
More information about the flang-commits
mailing list