Rather than admit complete confusion with a "FAIL" message when parsing runs into the end of the source file unexpectedly, deal better with missing or garbled END statements through the use of `consumedAllInput` in end-of-line and end-of-statement parsers and error recovery. Adds a new test (the original motivation) and updates the expected results in two extant tests that were failing before.
10 lines
316 B
Fortran
10 lines
316 B
Fortran
! RUN: not %flang_fc1 -fsyntax-only %s 2>&1 | FileCheck %s
|
|
! CHECK:error: end of file
|
|
! CHECK:in the context: END PROGRAM statement
|
|
! CHECK:unparseable.f90:9:1: in the context: main program
|
|
! CHECK:error: end of file
|
|
! CHECK:unparseable.f90:9:1: in the context: SELECT TYPE construct
|
|
module m
|
|
end
|
|
select type (barf)
|