diff options
Diffstat (limited to 'clang-tools-extra/clangd/ConfigYAML.cpp')
-rw-r--r-- | clang-tools-extra/clangd/ConfigYAML.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang-tools-extra/clangd/ConfigYAML.cpp b/clang-tools-extra/clangd/ConfigYAML.cpp index 6086357..289b7e8 100644 --- a/clang-tools-extra/clangd/ConfigYAML.cpp +++ b/clang-tools-extra/clangd/ConfigYAML.cpp @@ -69,6 +69,7 @@ public: Dict.handle("Hover", [&](Node &N) { parse(F.Hover, N); }); Dict.handle("InlayHints", [&](Node &N) { parse(F.InlayHints, N); }); Dict.handle("SemanticTokens", [&](Node &N) { parse(F.SemanticTokens, N); }); + Dict.handle("Documentation", [&](Node &N) { parse(F.Documentation, N); }); Dict.parse(N); return !(N.failed() || HadError); } @@ -312,6 +313,15 @@ private: Dict.parse(N); } + void parse(Fragment::DocumentationBlock &F, Node &N) { + DictParser Dict("Documentation", this); + Dict.handle("CommentFormat", [&](Node &N) { + if (auto Value = scalarValue(N, "CommentFormat")) + F.CommentFormat = *Value; + }); + Dict.parse(N); + } + // Helper for parsing mapping nodes (dictionaries). // We don't use YamlIO as we want to control over unknown keys. class DictParser { |