//===--- ParseStmt.cpp - Statement and Block Parser -----------------------===////// The LLVM Compiler Infrastructure//// This file is distributed under the University of Illinois Open Source// License. See LICENSE.TXT for details.////===----------------------------------------------------------------------===////// This file implements the Statement and Block portions of the Parser// interface.////===----------------------------------------------------------------------===//#include"clang/Parse/Parser.h"#include"ExtensionRAIIObject.h"#include"clang/Parse/DeclSpec.h"#include"clang/Parse/Scope.h"#include"clang/Basic/Diagnostic.h"#include"clang/Basic/PrettyStackTrace.h"#include"clang/Basic/SourceManager.h"usingnamespaceclang;//===----------------------------------------------------------------------===//// C99 6.8: Statements and Blocks.//===----------------------------------------------------------------------===///// ParseStatementOrDeclaration - Read 'statement' or 'declaration'./// StatementOrDeclaration:/// statement/// declaration////// statement:/// labeled-statement/// compound-statement/// expression-statement/// selection-statement/// iteration-statement/// jump-statement/// [C++] declaration-statement/// [C++] try-block/// [OBC] objc-throw-statement/// [OBC] objc-try-catch-statement/// [OBC] objc-synchronized-statement/// [GNU] asm-statement/// [OMP] openmp-construct [TODO]////// labeled-statement:/// identifier ':' statement/// 'case' constant-expression ':' statement/// 'default' ':' statement////// selection-statement:/// if-statement/// switch-statement////// iteration-statement:/// while-statement/// do-statement/// for-statement////// expression-statement:/// expression[opt] ';'////// jump-statement:/// 'goto' identifier ';'/// 'continue' ';'/// 'break' ';'/// 'return' expression[opt] ';'/// [GNU] 'goto' '*' expression ';'////// [OBC] objc-throw-statement:/// [OBC] '@' 'throw' expression ';'/// [OBC] '@' 'throw' ';'///Parser::OwningStmtResultParser::ParseStatementOrDeclaration(boolOnlyStatement){constchar*SemiError=0;OwningStmtResultRes(Actions);// Cases in this switch statement should fall through if the parser expects// the token to end in a semicolon (in which case SemiError should be set),// or they directly 'return;' if not.tok