llcppsigfetch:TypedefDecl & Elaborated Type Refer

This commit is contained in:
luoliwoshang
2024-08-21 18:25:51 +08:00
parent 815fe25f2c
commit e09c5fcb3c
4 changed files with 237 additions and 2 deletions

View File

@@ -74,6 +74,10 @@ func MarshalASTDecl(decl ast.Decl) *cjson.JSON {
items.AddItem(MarshalASTExpr(i))
}
root.SetItem(c.Str("Items"), items)
case *ast.TypedefDecl:
MarshalASTDeclBase(d.DeclBase, root)
root.SetItem(c.Str("Name"), MarshalASTExpr(d.Name))
root.SetItem(c.Str("Type"), MarshalASTExpr(d.Type))
case *ast.FuncDecl:
MarshalASTDeclBase(d.DeclBase, root)
root.SetItem(c.Str("Name"), MarshalASTExpr(d.Name))