std::string uriStr;
};
+/// Add support for JSON serialization.
llvm::json::Value toJSON(const URIForFile &value);
bool fromJSON(const llvm::json::Value &value, URIForFile &result,
llvm::json::Path path);
Messages = 1,
Verbose = 2,
};
+
+/// Add support for JSON serialization.
bool fromJSON(const llvm::json::Value &value, TraceLevel &result,
llvm::json::Path path);
/// The initial trace setting. If omitted trace is disabled ('off').
Optional<TraceLevel> trace;
};
+
+/// Add support for JSON serialization.
bool fromJSON(const llvm::json::Value &value, InitializeParams &result,
llvm::json::Path path);
/// The content of the opened text document.
std::string text;
};
+
+/// Add support for JSON serialization.
bool fromJSON(const llvm::json::Value &value, TextDocumentItem &result,
llvm::json::Path path);
/// The text document's URI.
URIForFile uri;
};
+
+/// Add support for JSON serialization.
llvm::json::Value toJSON(const TextDocumentIdentifier &value);
bool fromJSON(const llvm::json::Value &value, TextDocumentIdentifier &result,
llvm::json::Path path);
std::tie(rhs.line, rhs.character);
}
};
+
+/// Add support for JSON serialization.
bool fromJSON(const llvm::json::Value &value, Position &result,
llvm::json::Path path);
llvm::json::Value toJSON(const Position &value);
return start <= range.start && range.end <= end;
}
};
+
+/// Add support for JSON serialization.
bool fromJSON(const llvm::json::Value &value, Range &result,
llvm::json::Path path);
llvm::json::Value toJSON(const Range &value);
return std::tie(lhs.uri, lhs.range) < std::tie(rhs.uri, rhs.range);
}
};
+
+/// Add support for JSON serialization.
llvm::json::Value toJSON(const Location &value);
raw_ostream &operator<<(raw_ostream &os, const Location &value);
/// The position inside the text document.
Position position;
};
+
+/// Add support for JSON serialization.
bool fromJSON(const llvm::json::Value &value,
TextDocumentPositionParams &result, llvm::json::Path path);
/// Include the declaration of the current symbol.
bool includeDeclaration = false;
};
+
+/// Add support for JSON serialization.
bool fromJSON(const llvm::json::Value &value, ReferenceContext &result,
llvm::json::Path path);
struct ReferenceParams : public TextDocumentPositionParams {
ReferenceContext context;
};
+
+/// Add support for JSON serialization.
bool fromJSON(const llvm::json::Value &value, ReferenceParams &result,
llvm::json::Path path);
/// The document that was opened.
TextDocumentItem textDocument;
};
+
+/// Add support for JSON serialization.
bool fromJSON(const llvm::json::Value &value, DidOpenTextDocumentParams &result,
llvm::json::Path path);
/// The document that was closed.
TextDocumentIdentifier textDocument;
};
+
+/// Add support for JSON serialization.
bool fromJSON(const llvm::json::Value &value,
DidCloseTextDocumentParams &result, llvm::json::Path path);
/// The new text of the range/document.
std::string text;
};
+
+/// Add support for JSON serialization.
bool fromJSON(const llvm::json::Value &value,
TextDocumentContentChangeEvent &result, llvm::json::Path path);
/// The actual content changes.
std::vector<TextDocumentContentChangeEvent> contentChanges;
};
+
+/// Add support for JSON serialization.
bool fromJSON(const llvm::json::Value &value,
DidChangeTextDocumentParams &result, llvm::json::Path path);
MarkupKind kind = MarkupKind::PlainText;
std::string value;
};
+
+/// Add support for JSON serialization.
llvm::json::Value toJSON(const MarkupContent &mc);
//===----------------------------------------------------------------------===//
/// visualize a hover, e.g. by changing the background color.
Optional<Range> range;
};
+
+/// Add support for JSON serialization.
llvm::json::Value toJSON(const Hover &hover);
//===----------------------------------------------------------------------===//
/// The message of this related diagnostic information.
std::string message;
};
+
+/// Add support for JSON serialization.
llvm::json::Value toJSON(const DiagnosticRelatedInformation &info);
//===----------------------------------------------------------------------===//
/// which the issue was produced, e.g. "Semantic Issue" or "Parse Issue".
Optional<std::string> category;
};
+
+/// Add support for JSON serialization.
llvm::json::Value toJSON(const Diagnostic &diag);
//===----------------------------------------------------------------------===//
/// The list of reported diagnostics.
std::vector<Diagnostic> diagnostics;
};
+
+/// Add support for JSON serialization.
llvm::json::Value toJSON(const PublishDiagnosticsParams ¶ms);
} // namespace lsp