@@ -286,7 +286,7 @@ func (c *Collector) exportSymbol(repo *uniast.Repository, symbol *DocumentSymbol
286
286
obj .GlobalVars = make ([]uniast.Dependency , 0 , len (deps ))
287
287
}
288
288
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 :
290
290
if obj .Types == nil {
291
291
obj .Types = make ([]uniast.Dependency , 0 , len (deps ))
292
292
}
@@ -300,7 +300,7 @@ func (c *Collector) exportSymbol(repo *uniast.Repository, symbol *DocumentSymbol
300
300
pkg .Functions [id .Name ] = obj
301
301
302
302
// Type
303
- case lsp .SKStruct , lsp .SKTypeParameter , lsp .SKInterface , lsp .SKEnum :
303
+ case lsp .SKStruct , lsp .SKTypeParameter , lsp .SKInterface , lsp .SKEnum , lsp . SKClass :
304
304
obj := & uniast.Type {
305
305
FileLine : fileLine ,
306
306
Content : content ,
@@ -317,7 +317,7 @@ func (c *Collector) exportSymbol(repo *uniast.Repository, symbol *DocumentSymbol
317
317
continue
318
318
}
319
319
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 :
321
321
obj .SubStruct = append (obj .SubStruct , uniast .NewDependency (* depid , c .fileLine (dep .Location )))
322
322
default :
323
323
log .Error ("dep symbol %s not collected for \n " , dep .Symbol , id )
@@ -370,6 +370,9 @@ func mapKind(kind lsp.SymbolKind) uniast.TypeKind {
370
370
switch kind {
371
371
case lsp .SKStruct :
372
372
return "struct"
373
+ // XXX: C++ should use class instead of struct
374
+ case lsp .SKClass :
375
+ return "struct"
373
376
case lsp .SKTypeParameter :
374
377
return "type-parameter"
375
378
case lsp .SKInterface :
0 commit comments