clang
9.0.0
|
A node in a syntax tree. More...
#include "clang/Tooling/Syntax/Tree.h"
Public Member Functions | |
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 Tree * | parent () const |
Tree * | parent () |
const Node * | nextSibling () const |
Node * | nextSibling () |
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... | |
Friends | |
class | Tree |
A node in a syntax tree.
Each node is either a Leaf (representing tokens) or a Tree (representing language constructrs).
syntax::Node::Node | ( | NodeKind | Kind | ) |
std::string syntax::Node::dump | ( | const Arena & | A | ) | const |
std::string syntax::Node::dumpTokens | ( | const Arena & | A | ) | const |
Dumps the tokens forming this subtree.
Definition at line 131 of file Tree.cpp.
References clang::syntax::Arena::sourceManager().
Referenced by clang::syntax::Tree::classof().
|
inline |
Definition at line 79 of file Tree.h.
Referenced by clang::syntax::TranslationUnit::classof(), clang::syntax::TopLevelDeclaration::classof(), clang::syntax::Statement::classof(), clang::syntax::CompoundStatement::classof(), clang::syntax::Leaf::classof(), and clang::syntax::Tree::classof().
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 80 of file Tree.h.
Referenced by clang::syntax::Tree::classof().