mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-29 11:01:57 +00:00
JsonWriter: write "null" if VersionedTextDocumentIdentifier.version is null
Fix #387
This commit is contained in:
parent
aa2f55eb2b
commit
94727b7eae
@ -165,11 +165,22 @@ struct WorkspaceSymbolParam {
|
|||||||
};
|
};
|
||||||
REFLECT_STRUCT(WorkspaceFolder, uri, name);
|
REFLECT_STRUCT(WorkspaceFolder, uri, name);
|
||||||
|
|
||||||
inline void Reflect(JsonReader &visitor, DocumentUri &value) {
|
inline void Reflect(JsonReader &vis, DocumentUri &v) {
|
||||||
Reflect(visitor, value.raw_uri);
|
Reflect(vis, v.raw_uri);
|
||||||
}
|
}
|
||||||
inline void Reflect(JsonWriter &visitor, DocumentUri &value) {
|
inline void Reflect(JsonWriter &vis, DocumentUri &v) {
|
||||||
Reflect(visitor, value.raw_uri);
|
Reflect(vis, v.raw_uri);
|
||||||
|
}
|
||||||
|
inline void Reflect(JsonReader &vis, VersionedTextDocumentIdentifier &v) {
|
||||||
|
REFLECT_MEMBER(uri);
|
||||||
|
REFLECT_MEMBER(version);
|
||||||
|
}
|
||||||
|
inline void Reflect(JsonWriter &vis, VersionedTextDocumentIdentifier &v) {
|
||||||
|
vis.StartObject();
|
||||||
|
REFLECT_MEMBER(uri);
|
||||||
|
vis.Key("version");
|
||||||
|
Reflect(vis, v.version);
|
||||||
|
vis.EndObject();
|
||||||
}
|
}
|
||||||
|
|
||||||
REFLECT_UNDERLYING(ErrorCode);
|
REFLECT_UNDERLYING(ErrorCode);
|
||||||
@ -182,7 +193,6 @@ REFLECT_UNDERLYING_B(SymbolKind);
|
|||||||
REFLECT_STRUCT(TextDocumentIdentifier, uri);
|
REFLECT_STRUCT(TextDocumentIdentifier, uri);
|
||||||
REFLECT_STRUCT(TextDocumentItem, uri, languageId, version, text);
|
REFLECT_STRUCT(TextDocumentItem, uri, languageId, version, text);
|
||||||
REFLECT_STRUCT(TextEdit, range, newText);
|
REFLECT_STRUCT(TextEdit, range, newText);
|
||||||
REFLECT_STRUCT(VersionedTextDocumentIdentifier, uri, version);
|
|
||||||
REFLECT_STRUCT(DiagnosticRelatedInformation, location, message);
|
REFLECT_STRUCT(DiagnosticRelatedInformation, location, message);
|
||||||
REFLECT_STRUCT(Diagnostic, range, severity, code, source, message, relatedInformation);
|
REFLECT_STRUCT(Diagnostic, range, severity, code, source, message, relatedInformation);
|
||||||
REFLECT_STRUCT(ShowMessageParam, type, message);
|
REFLECT_STRUCT(ShowMessageParam, type, message);
|
||||||
|
Loading…
Reference in New Issue
Block a user