clang  10.0.0svn
Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends | List of all members
clang::syntax::Tree Class Reference

A node that has children and represents a syntactic language construct. More...

#include "clang/Tooling/Syntax/Tree.h"

Inheritance diagram for clang::syntax::Tree:
Inheritance graph
[legend]
Collaboration diagram for clang::syntax::Tree:
Collaboration graph
[legend]

Public Member Functions

NodefirstChild ()
 
const NodefirstChild () const
 
- Public Member Functions inherited from clang::syntax::Node
 Node (NodeKind Kind)
 Newly created nodes are detached from a tree, parent and sibling links are set when the node is added as a child to another one. More...
 
NodeKind kind () const
 
NodeRole role () const
 
const Treeparent () const
 
Treeparent ()
 
const NodenextSibling () const
 
NodenextSibling ()
 
std::string dump (const Arena &A) const
 Dumps the structure of a subtree. For debugging and testing purposes. More...
 
std::string dumpTokens (const Arena &A) const
 Dumps the tokens forming this subtree. More...
 

Static Public Member Functions

static bool classof (const Node *N)
 

Protected Member Functions

syntax::NodefindChild (NodeRole R)
 Find the first node with a corresponding role. More...
 

Friends

class TreeBuilder
 

Detailed Description

A node that has children and represents a syntactic language construct.

Definition at line 116 of file Tree.h.

Member Function Documentation

◆ classof()

bool syntax::Tree::classof ( const Node N)
static

◆ findChild()

syntax::Node * syntax::Tree::findChild ( NodeRole  R)
protected

Find the first node with a corresponding role.

Definition at line 143 of file Tree.cpp.

Referenced by clang::syntax::CompoundStatement::lbrace(), and clang::syntax::CompoundStatement::rbrace().

◆ firstChild() [1/2]

Node* clang::syntax::Tree::firstChild ( )
inline

Definition at line 121 of file Tree.h.

◆ firstChild() [2/2]

const Node* clang::syntax::Tree::firstChild ( ) const
inline

Definition at line 122 of file Tree.h.

Friends And Related Function Documentation

◆ TreeBuilder

friend class TreeBuilder
friend

Definition at line 134 of file Tree.h.


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