loom
82 строки · 2.0 Кб
1#include "simodo/lsp/client/LspEnumsParsers.h"
2
3namespace simodo::lsp
4{
5
6std::u16string getDiagnosticSeverityString(DiagnosticSeverity severity)
7{
8switch(severity)
9{
10case DiagnosticSeverity::Error:
11return u"error";
12case DiagnosticSeverity::Warning:
13return u"warning";
14case DiagnosticSeverity::Information:
15return u"information";
16case DiagnosticSeverity::Hint:
17return u"hint";
18}
19return u"*";
20}
21
22std::u16string getSymbolKindString(SymbolKind kind)
23{
24switch(kind)
25{
26case SymbolKind::File:
27return u"File";
28case SymbolKind::Module:
29return u"Module";
30case SymbolKind::Namespace:
31return u"Namespace";
32case SymbolKind::Package:
33return u"Package";
34case SymbolKind::Class:
35return u"Class";
36case SymbolKind::Method:
37return u"Method";
38case SymbolKind::Property:
39return u"Property";
40case SymbolKind::Field:
41return u"Field";
42case SymbolKind::Constructor:
43return u"Constructor";
44case SymbolKind::Enum:
45return u"Enum";
46case SymbolKind::Interface:
47return u"Interface";
48case SymbolKind::Function:
49return u"Function";
50case SymbolKind::Variable:
51return u"Variable";
52case SymbolKind::Constant:
53return u"Constant";
54case SymbolKind::String:
55return u"String";
56case SymbolKind::Number:
57return u"Number";
58case SymbolKind::Boolean:
59return u"Boolean";
60case SymbolKind::Array:
61return u"Array";
62case SymbolKind::Object:
63return u"Object";
64case SymbolKind::Key:
65return u"Key";
66case SymbolKind::Null:
67return u"Null";
68case SymbolKind::EnumMember:
69return u"EnumMember";
70case SymbolKind::Struct:
71return u"Struct";
72case SymbolKind::Event:
73return u"Event";
74case SymbolKind::Operator:
75return u"Operator";
76case SymbolKind::TypeParameter:
77return u"TypeParameter";
78}
79return u"*";
80}
81
82}
83