MLIR  20.0.0git
Public Member Functions | Public Attributes | List of all members
mlir::lsp::DocumentSymbol Struct Reference

Represents programming constructs like variables, classes, interfaces etc. More...

#include "mlir/Tools/lsp-server-support/Protocol.h"

Public Member Functions

 DocumentSymbol ()=default
 
 DocumentSymbol (DocumentSymbol &&)=default
 
 DocumentSymbol (const Twine &name, SymbolKind kind, Range range, Range selectionRange)
 

Public Attributes

std::string name
 The name of this symbol. More...
 
std::string detail
 More detail for this symbol, e.g the signature of a function. More...
 
SymbolKind kind
 The kind of this symbol. More...
 
Range range
 The range enclosing this symbol not including leading/trailing whitespace but everything else like comments. More...
 
Range selectionRange
 The range that should be selected and revealed when this symbol is being picked, e.g the name of a function. More...
 
std::vector< DocumentSymbolchildren
 Children of this symbol, e.g. properties of a class. More...
 

Detailed Description

Represents programming constructs like variables, classes, interfaces etc.

that appear in a document. Document symbols can be hierarchical and they have two ranges: one that encloses its definition and one that points to its most interesting range, e.g. the range of an identifier.

Definition at line 593 of file Protocol.h.

Constructor & Destructor Documentation

◆ DocumentSymbol() [1/3]

mlir::lsp::DocumentSymbol::DocumentSymbol ( )
default

◆ DocumentSymbol() [2/3]

mlir::lsp::DocumentSymbol::DocumentSymbol ( DocumentSymbol &&  )
default

◆ DocumentSymbol() [3/3]

mlir::lsp::DocumentSymbol::DocumentSymbol ( const Twine &  name,
SymbolKind  kind,
Range  range,
Range  selectionRange 
)
inline

Definition at line 596 of file Protocol.h.

Member Data Documentation

◆ children

std::vector<DocumentSymbol> mlir::lsp::DocumentSymbol::children

Children of this symbol, e.g. properties of a class.

Definition at line 621 of file Protocol.h.

Referenced by mlir::lsp::toJSON().

◆ detail

std::string mlir::lsp::DocumentSymbol::detail

More detail for this symbol, e.g the signature of a function.

Definition at line 605 of file Protocol.h.

Referenced by mlir::lsp::toJSON().

◆ kind

SymbolKind mlir::lsp::DocumentSymbol::kind

The kind of this symbol.

Definition at line 608 of file Protocol.h.

Referenced by mlir::lsp::toJSON().

◆ name

std::string mlir::lsp::DocumentSymbol::name

The name of this symbol.

Definition at line 602 of file Protocol.h.

Referenced by mlir::lsp::toJSON().

◆ range

Range mlir::lsp::DocumentSymbol::range

The range enclosing this symbol not including leading/trailing whitespace but everything else like comments.

This information is typically used to determine if the clients cursor is inside the symbol to reveal in the symbol in the UI.

Definition at line 614 of file Protocol.h.

Referenced by mlir::lsp::toJSON().

◆ selectionRange

Range mlir::lsp::DocumentSymbol::selectionRange

The range that should be selected and revealed when this symbol is being picked, e.g the name of a function.

Must be contained by the range.

Definition at line 618 of file Protocol.h.

Referenced by mlir::lsp::toJSON().


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