27 {
"range", PD.
range()},
34 R[
"severity"] = Diagnostic::severity(D.
kind());
36 R[
"sname"] = D.
sname();
37 R[
"notes"] = D.
notes();
38 R[
"fixes"] = D.
fixes();
44 R[
"sname"] = N.
sname();
Provide jsonified diagnostic, for other languages/structured output.
static const char * message(DiagnosticKind Kind)
DiagnosticKind kind() const
static const char * sname(DiagnosticKind Kind)
const std::vector< Fix > & fixes() const
const std::vector< Note > & notes() const
const std::vector< TextEdit > & edits() const
const std::string & message() const
A point in the source file.
int64_t column() const
Column number, starting from 0.
std::size_t offset() const
Offset in the source file, starting from 0.
int64_t line() const
Line number, starting from 0.
static const char * sname(NoteKind Kind)
static const char * message(NoteKind Kind)
const std::vector< std::string > & args() const
const std::vector< DiagnosticTag > & tags() const
LexerCursorRange range() const
std::string_view newText() const
LexerCursorRange oldRange() const
void to_json(nlohmann::json &R, const LexerCursor &LC)