clang API Documentation
#include <Parser.h>


Classes | |
| class | BalancedDelimiterTracker |
| RAII class that helps handle the parsing of an open/close delimiter pair, such as braces { ... } or parentheses ( ... ). | |
| class | DeclaratorScopeObj |
| class | DelimiterTracker |
| Tracks information about the current nesting depth of opening delimiters of each kind. | |
| struct | FieldCallback |
| struct | ForRangeInit |
| struct | IfExistsCondition |
| Describes the condition of a Microsoft __if_exists or __if_not_exists block. | |
| struct | LateParsedAttribute |
| class | LateParsedClass |
| class | LateParsedDeclaration |
| struct | LateParsedDefaultArgument |
| struct | LateParsedMemberInitializer |
| struct | LateParsedMethodDeclaration |
| struct | LateParsedTemplatedFunction |
| Contains a late templated function. Will be parsed at the end of the translation unit. | |
| struct | LexedMethod |
| class | ObjCDeclContextSwitch |
| struct | ObjCImplParsingDataRAII |
| struct | ObjCPropertyCallback |
| struct | ParsedAttributesWithRange |
| struct | ParsedTemplateInfo |
| Contains information about any template-specific information that has been parsed prior to parsing declaration specifiers. | |
| class | ParseScope |
| class | ParseScopeFlags |
| RAII object used to modify the scope flags for the current scope. | |
| struct | ParsingClass |
| Representation of a class that has been parsed, including any member function declarations or definitions that need to be parsed after the corresponding top-level class is complete. | |
| class | ParsingClassDefinition |
| RAII object used to. | |
| class | ParsingDeclarator |
| A class for parsing a declarator. | |
| class | ParsingDeclRAIIObject |
| RAII object used to inform the actions that we're currently parsing a declaration. This is active when parsing a variable's initializer, but not when parsing the body of a class or function definition. | |
| class | ParsingDeclSpec |
| A class for parsing a DeclSpec. | |
| class | TentativeParsingAction |
| class | TPResult |
Public Types | |
| typedef OpaquePtr< DeclGroupRef > | DeclGroupPtrTy |
| typedef OpaquePtr< TemplateName > | TemplateTy |
| typedef SmallVector < TemplateParameterList *, 4 > | TemplateParameterLists |
| typedef clang::ExprResult | ExprResult |
| typedef clang::StmtResult | StmtResult |
| typedef clang::BaseResult | BaseResult |
| typedef clang::MemInitResult | MemInitResult |
| typedef clang::TypeResult | TypeResult |
| typedef Expr * | ExprArg |
| typedef ASTMultiPtr< Stmt * > | MultiStmtArg |
| typedef Sema::FullExprArg | FullExprArg |
Public Member Functions | |
| Parser (Preprocessor &PP, Sema &Actions) | |
| ~Parser () | |
| const LangOptions & | getLang () const |
| const TargetInfo & | getTargetInfo () const |
| Preprocessor & | getPreprocessor () const |
| Sema & | getActions () const |
| const Token & | getCurToken () const |
| Scope * | getCurScope () const |
| Decl * | getObjCDeclContext () const |
| ExprResult | Owned (ExprResult res) |
| Adorns a ExprResult with Actions to make it an ExprResult. | |
| StmtResult | Owned (StmtResult res) |
| Adorns a StmtResult with Actions to make it an StmtResult. | |
| ExprResult | ExprError () |
| StmtResult | StmtError () |
| ExprResult | ExprError (const DiagnosticBuilder &) |
| StmtResult | StmtError (const DiagnosticBuilder &) |
| ExprResult | ExprEmpty () |
| void | ParseTranslationUnit () |
| void | Initialize () |
| bool | ParseTopLevelDecl (DeclGroupPtrTy &Result) |
| DiagnosticBuilder | Diag (SourceLocation Loc, unsigned DiagID) |
| DiagnosticBuilder | Diag (const Token &Tok, unsigned DiagID) |
Friends | |
| class | PragmaUnusedHandler |
| class | ColonProtectionRAIIObject |
| class | InMessageExpressionRAIIObject |
| class | PoisonSEHIdentifiersRAIIObject |
| class | ParenBraceBracketBalancer |
Parser - This implements a parser for the C family of languages. After parsing units of the grammar, productions are invoked to handle whatever has been read.
| typedef Expr* clang::Parser::ExprArg |
| typedef ASTMultiPtr<Stmt*> clang::Parser::MultiStmtArg |
| typedef SmallVector<TemplateParameterList *, 4> clang::Parser::TemplateParameterLists |
| Parser::Parser | ( | Preprocessor & | PP, |
| Sema & | Actions | ||
| ) |
Definition at line 34 of file Parser.cpp.
References clang::Preprocessor::AddPragmaHandler(), getLang(), PragmaUnusedHandler, clang::Preprocessor::setCodeCompletionHandler(), and clang::Token::setKind().
| Parser::~Parser | ( | ) |
Definition at line 356 of file Parser.cpp.
References clang::Preprocessor::clearCodeCompletionHandler(), getCurScope(), getLang(), and clang::Preprocessor::RemovePragmaHandler().
| DiagnosticBuilder Parser::Diag | ( | SourceLocation | Loc, |
| unsigned | DiagID | ||
| ) |
Definition at line 104 of file Parser.cpp.
References clang::DiagnosticsEngine::Report().
Referenced by CheckArrayDesignatorSyntax(), Diag(), FixDigraph(), and Initialize().
| DiagnosticBuilder Parser::Diag | ( | const Token & | Tok, |
| unsigned | DiagID | ||
| ) |
Definition at line 108 of file Parser.cpp.
References Diag(), and clang::Token::getLocation().
| ExprResult clang::Parser::ExprEmpty | ( | ) | [inline] |
| ExprResult clang::Parser::ExprError | ( | ) | [inline] |
| ExprResult clang::Parser::ExprError | ( | const DiagnosticBuilder & | ) | [inline] |
| Sema& clang::Parser::getActions | ( | ) | const [inline] |
Definition at line 206 of file Parser.h.
Referenced by clang::ParseAST().
| Scope* clang::Parser::getCurScope | ( | ) | const [inline] |
Definition at line 209 of file Parser.h.
References clang::Sema::getCurScope().
Referenced by Initialize(), ParseTranslationUnit(), and ~Parser().
| const Token& clang::Parser::getCurToken | ( | ) | const [inline] |
Definition at line 208 of file Parser.h.
Referenced by clang::PrettyStackTraceParserEntry::print().
| const LangOptions& clang::Parser::getLang | ( | ) | const [inline] |
Definition at line 203 of file Parser.h.
References clang::Preprocessor::getLangOptions().
Referenced by Initialize(), Parser(), ParseTopLevelDecl(), and ~Parser().
| Decl* clang::Parser::getObjCDeclContext | ( | ) | const [inline] |
Definition at line 211 of file Parser.h.
References clang::Sema::getObjCDeclContext().
| Preprocessor& clang::Parser::getPreprocessor | ( | ) | const [inline] |
Definition at line 205 of file Parser.h.
Referenced by clang::PrettyStackTraceParserEntry::print().
| const TargetInfo& clang::Parser::getTargetInfo | ( | ) | const [inline] |
Definition at line 204 of file Parser.h.
References clang::Preprocessor::getTargetInfo().
| void Parser::Initialize | ( | ) |
Initialize - Warm up the parser.
Definition at line 399 of file Parser.cpp.
References clang::Sema::ActOnTranslationUnitScope(), clang::Scope::DeclScope, Diag(), clang::IdentifierTable::get(), getCurScope(), clang::Preprocessor::getIdentifierInfo(), clang::Preprocessor::getIdentifierTable(), getLang(), clang::Token::is(), and clang::Preprocessor::SetPoisonReason().
Referenced by clang::ParseAST(), and ParseTranslationUnit().
| ExprResult clang::Parser::Owned | ( | ExprResult | res | ) | [inline] |
| StmtResult clang::Parser::Owned | ( | StmtResult | res | ) | [inline] |
| bool Parser::ParseTopLevelDecl | ( | DeclGroupPtrTy & | Result | ) |
ParseTopLevelDecl - Parse one top-level declaration. Returns true if the EOF was encountered.
ParseTopLevelDecl - Parse one top-level declaration, return whatever the action tells us to. This returns true if the EOF was encountered.
Definition at line 470 of file Parser.cpp.
References clang::Sema::ActOnEndOfTranslationUnit(), getLang(), clang::Token::is(), and clang::Sema::SetLateTemplateParser().
Referenced by clang::ParseAST(), and ParseTranslationUnit().
| void Parser::ParseTranslationUnit | ( | ) |
ParseTranslationUnit - All in one method that initializes parses, and shuts down the parser.
ParseTranslationUnit: translation-unit: [C99 6.9] external-declaration translation-unit external-declaration
Definition at line 498 of file Parser.cpp.
References getCurScope(), Initialize(), and ParseTopLevelDecl().
| StmtResult clang::Parser::StmtError | ( | ) | [inline] |
| StmtResult clang::Parser::StmtError | ( | const DiagnosticBuilder & | ) | [inline] |
friend class ColonProtectionRAIIObject [friend] |
friend class InMessageExpressionRAIIObject [friend] |
friend class ParenBraceBracketBalancer [friend] |
friend class PoisonSEHIdentifiersRAIIObject [friend] |
friend class PragmaUnusedHandler [friend] |