A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://clang.llvm.org/doxygen/classsyntax_1_1TreeBuilder.html below:

clang: clang::syntax::TreeBuilder Class Reference

A helper class for constructing the syntax tree while traversing a clang AST. More...

  TreeBuilder (syntax::Arena &Arena, TokenBufferTokenManager &TBTM)   llvm::BumpPtrAllocator &  allocator ()   const SourceManagersourceManager () const   void  foldNode (ArrayRef< syntax::Token > Range, syntax::Tree *New, ASTPtr From)   Populate children for New node, assuming it covers tokens from Range.
  void  foldNode (ArrayRef< syntax::Token > Range, syntax::Tree *New, TypeLoc L)   void  foldNode (llvm::ArrayRef< syntax::Token > Range, syntax::Tree *New, NestedNameSpecifierLoc From)   void  foldList (ArrayRef< syntax::Token > SuperRange, syntax::List *New, ASTPtr From)   Populate children for New list, assuming it covers tokens from a subrange of SuperRange.
  void  noticeDeclWithoutSemicolon (Decl *D)   Notifies that we should not consume trailing semicolon when computing token range of D.
  void  markStmtChild (Stmt *Child, NodeRole Role)   Mark the Child node with a corresponding Role.
  void  markExprChild (Expr *Child, NodeRole Role)   Should be called for expressions in non-statement position to avoid wrapping into expression statement.
  void  markChildToken (SourceLocation Loc, NodeRole R)   Set role for a token starting at Loc.
  void  markChildToken (const syntax::Token *T, NodeRole R)   Set role for T.
  void  markChild (syntax::Node *N, NodeRole R)   Set role for N.
  void  markChild (ASTPtr N, NodeRole R)   Set role for the syntax node matching N.
  void  markChild (NestedNameSpecifierLoc N, NodeRole R)   Set role for the syntax node matching N.
  syntax::TranslationUnit *  finalize () &&   Finish building the tree and consume the root node.
  const syntax::TokenfindToken (SourceLocation L) const   Finds a token starting at L. The token must exist if L is valid.
  ArrayRef< syntax::TokengetRange (SourceRange Range) const   Finds the syntax tokens corresponding to the SourceRange.
  ArrayRef< syntax::TokengetRange (SourceLocation First, SourceLocation Last) const   Finds the syntax tokens corresponding to the passed source locations.
  ArrayRef< syntax::TokengetTemplateRange (const ClassTemplateSpecializationDecl *D) const   bool  isResponsibleForCreatingDeclaration (const Decl *D) const   Returns true if D is the last declarator in a chain and is thus reponsible for creating SimpleDeclaration for the whole chain.
  ArrayRef< syntax::TokengetDeclarationRange (Decl *D)   ArrayRef< syntax::TokengetExprRange (const Expr *E) const   ArrayRef< syntax::TokengetStmtRange (const Stmt *S) const   Find the adjusted range for the statement, consuming the trailing semicolon when needed.
 

A helper class for constructing the syntax tree while traversing a clang AST.

At each point of the traversal we maintain a list of pending nodes. Initially all tokens are added as pending nodes. When processing a clang AST node, the clients need to:

Note that all children are expected to be processed when building a node.

Call finalize() to finish building the tree and consume the root node.

Definition at line 367 of file BuildTree.cpp.

◆ TreeBuilder() ◆ allocator() llvm::BumpPtrAllocator & clang::syntax::TreeBuilder::allocator ( ) inline ◆ finalize() syntax::TranslationUnit * clang::syntax::TreeBuilder::finalize ( ) && inline ◆ findToken() ◆ foldList() ◆ foldNode() [1/3] ◆ foldNode() [2/3] ◆ foldNode() [3/3] ◆ getDeclarationRange() ◆ getExprRange() ◆ getRange() [1/2] ◆ getRange() [2/2] ◆ getStmtRange() ◆ getTemplateRange() ◆ isResponsibleForCreatingDeclaration() bool clang::syntax::TreeBuilder::isResponsibleForCreatingDeclaration ( const DeclD ) const inline ◆ markChild() [1/3] void clang::syntax::TreeBuilder::markChild ( ASTPtr  N, NodeRole  R  )

Set role for the syntax node matching N.

Definition at line 1706 of file BuildTree.cpp.

◆ markChild() [2/3]

Set role for the syntax node matching N.

Definition at line 1711 of file BuildTree.cpp.

◆ markChild() [3/3] ◆ markChildToken() [1/2] ◆ markChildToken() [2/2] ◆ markExprChild() void clang::syntax::TreeBuilder::markExprChild ( ExprChild, NodeRole  Role  )

Should be called for expressions in non-statement position to avoid wrapping into expression statement.

Definition at line 1736 of file BuildTree.cpp.

References IgnoreImplicit().

◆ markStmtChild() void clang::syntax::TreeBuilder::markStmtChild ( StmtChild, NodeRole  Role  ) ◆ noticeDeclWithoutSemicolon() void clang::syntax::TreeBuilder::noticeDeclWithoutSemicolon ( DeclD )

Notifies that we should not consume trailing semicolon when computing token range of D.

Definition at line 1685 of file BuildTree.cpp.

References D.

◆ sourceManager() const SourceManager & clang::syntax::TreeBuilder::sourceManager ( ) const inline

The documentation for this class was generated from the following file:


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4