nixd
Loading...
Searching...
No Matches
Public Attributes | List of all members
lspserver::ASTNode Struct Reference

#include <Protocol.h>

Public Attributes

std::string role
 
std::string kind
 
std::string detail
 
std::string arcana
 
std::optional< Rangerange
 
std::vector< ASTNodechildren
 Nodes nested within this one, such as the operands of a BinaryOperator.
 

Detailed Description

Simplified description of a clang AST node. This is clangd's internal representation of C++ code.

Definition at line 1873 of file lspserver/include/lspserver/Protocol.h.

Member Data Documentation

◆ arcana

std::string lspserver::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 1888 of file lspserver/include/lspserver/Protocol.h.

◆ children

std::vector<ASTNode> lspserver::ASTNode::children

Nodes nested within this one, such as the operands of a BinaryOperator.

Definition at line 1893 of file lspserver/include/lspserver/Protocol.h.

◆ detail

std::string lspserver::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 1883 of file lspserver/include/lspserver/Protocol.h.

◆ kind

std::string lspserver::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 1880 of file lspserver/include/lspserver/Protocol.h.

◆ range

std::optional<Range> lspserver::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 1891 of file lspserver/include/lspserver/Protocol.h.

◆ role

std::string lspserver::ASTNode::role

The general kind of node, such as "expression" Corresponds to the base AST node type such as Expr.

Definition at line 1876 of file lspserver/include/lspserver/Protocol.h.


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