diff options
author | arphaman <arphaman@gmail.com> | 2013-10-02 19:11:29 +0100 |
---|---|---|
committer | arphaman <arphaman@gmail.com> | 2013-10-02 19:11:29 +0100 |
commit | 13fdb50e5f76b245047b4b1ba860c61bfac38a28 (patch) | |
tree | 8f2e01dbbe1bf0d96d2840b1e3f4463b45b5e9cc | |
parent | 299846d1dfd5b00a003c08bd9340a9766356711a (diff) | |
download | flang-13fdb50e5f76b245047b4b1ba860c61bfac38a28.tar.gz |
fixed parsing for PROGRAM stmt
-rw-r--r-- | lib/Parse/Parser.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/Parse/Parser.cpp b/lib/Parse/Parser.cpp index d89a7b184f..a814475f16 100644 --- a/lib/Parse/Parser.cpp +++ b/lib/Parse/Parser.cpp @@ -1239,14 +1239,11 @@ Parser::StmtResult Parser::ParsePROGRAMStmt() { // Parse the program name. Lex(); - if (Tok.isNot(tok::identifier) || Tok.isAtStartOfStatement()) { - Diag.Report(ProgramLoc, diag::err_expected_ident); - return StmtError(); - } - SourceLocation NameLoc = Tok.getLocation(); IDInfo = Tok.getIdentifierInfo(); - Lex(); // Eat program name. + if(!ExpectAndConsume(tok::identifier)) + return StmtError(); + return Actions.ActOnPROGRAM(Context, IDInfo, ProgramLoc, NameLoc, StmtLabel); } |