@@ -286,7 +286,7 @@ func (c *Collector) exportSymbol(repo *uniast.Repository, symbol *DocumentSymbol
286286 obj .GlobalVars = make ([]uniast.Dependency , 0 , len (deps ))
287287 }
288288 obj .GlobalVars = uniast .InsertDependency (obj .GlobalVars , pdep )
289- case lsp .SKStruct , lsp .SKTypeParameter , lsp .SKInterface , lsp .SKEnum :
289+ case lsp .SKStruct , lsp .SKTypeParameter , lsp .SKInterface , lsp .SKEnum , lsp . SKClass :
290290 if obj .Types == nil {
291291 obj .Types = make ([]uniast.Dependency , 0 , len (deps ))
292292 }
@@ -300,7 +300,7 @@ func (c *Collector) exportSymbol(repo *uniast.Repository, symbol *DocumentSymbol
300300 pkg .Functions [id .Name ] = obj
301301
302302 // Type
303- case lsp .SKStruct , lsp .SKTypeParameter , lsp .SKInterface , lsp .SKEnum :
303+ case lsp .SKStruct , lsp .SKTypeParameter , lsp .SKInterface , lsp .SKEnum , lsp . SKClass :
304304 obj := & uniast.Type {
305305 FileLine : fileLine ,
306306 Content : content ,
@@ -317,7 +317,7 @@ func (c *Collector) exportSymbol(repo *uniast.Repository, symbol *DocumentSymbol
317317 continue
318318 }
319319 switch dep .Symbol .Kind {
320- case lsp .SKStruct , lsp .SKTypeParameter , lsp .SKInterface , lsp .SKEnum :
320+ case lsp .SKStruct , lsp .SKTypeParameter , lsp .SKInterface , lsp .SKEnum , lsp . SKClass :
321321 obj .SubStruct = append (obj .SubStruct , uniast .NewDependency (* depid , c .fileLine (dep .Location )))
322322 default :
323323 log .Error ("dep symbol %s not collected for \n " , dep .Symbol , id )
@@ -370,6 +370,9 @@ func mapKind(kind lsp.SymbolKind) uniast.TypeKind {
370370 switch kind {
371371 case lsp .SKStruct :
372372 return "struct"
373+ // XXX: C++ should use class instead of struct
374+ case lsp .SKClass :
375+ return "struct"
373376 case lsp .SKTypeParameter :
374377 return "type-parameter"
375378 case lsp .SKInterface :
0 commit comments