clang-tools 20.0.0git
|
Simplified description of a clang AST node. More...
#include <Protocol.h>
Public Attributes | |
std::string | role |
The general kind of node, such as "expression" Corresponds to the base AST node type such as Expr. | |
std::string | kind |
The specific kind of node this is, such as "BinaryOperator". | |
std::string | detail |
Brief additional information, such as "||" for the particular operator. | |
std::string | arcana |
A one-line dump of detailed information about the node. | |
std::optional< Range > | range |
The range of the original source file covered by this node. | |
std::vector< ASTNode > | children |
Nodes nested within this one, such as the operands of a BinaryOperator. | |
Simplified description of a clang AST node.
This is clangd's internal representation of C++ code.
Definition at line 2009 of file Protocol.h.
std::string clang::clangd::ASTNode::arcana |
A one-line dump of detailed information about the node.
This includes role/kind/description information, but is rather cryptic. It is similar to the output from clang -Xclang -ast-dump
. May be empty for certain types of nodes.
Definition at line 2024 of file Protocol.h.
Referenced by clang::clangd::toJSON().
std::vector<ASTNode> clang::clangd::ASTNode::children |
Nodes nested within this one, such as the operands of a BinaryOperator.
Definition at line 2029 of file Protocol.h.
Referenced by clang::clangd::operator<<(), and clang::clangd::toJSON().
std::string clang::clangd::ASTNode::detail |
Brief additional information, such as "||" for the particular operator.
The information included depends on the node kind, and may be empty.
Definition at line 2019 of file Protocol.h.
Referenced by clang::clangd::operator<<(), and clang::clangd::toJSON().
std::string clang::clangd::ASTNode::kind |
The specific kind of node this is, such as "BinaryOperator".
This is usually a concrete node class (with Expr etc suffix dropped). When there's no hierarchy (e.g. TemplateName), the variant (NameKind).
Definition at line 2016 of file Protocol.h.
Referenced by clang::clangd::operator<<(), and clang::clangd::toJSON().
std::optional<Range> clang::clangd::ASTNode::range |
The range of the original source file covered by this node.
May be missing for implicit nodes, or those created by macro expansion.
Definition at line 2027 of file Protocol.h.
Referenced by clang::clangd::toJSON().
std::string clang::clangd::ASTNode::role |
The general kind of node, such as "expression" Corresponds to the base AST node type such as Expr.
Definition at line 2012 of file Protocol.h.
Referenced by clang::clangd::operator<<(), and clang::clangd::toJSON().