llcppsigfetch:split test directory

This commit is contained in:
luoliwoshang
2024-08-22 11:28:19 +08:00
parent d4fa379f11
commit 1557a76225
22 changed files with 2037 additions and 2005 deletions

View File

@@ -8,8 +8,8 @@ import (
func MarshalASTFiles(files map[string]*ast.File) *cjson.JSON {
root := cjson.Object()
for _, file := range files {
root.SetItem(c.AllocaCStr(file.Path), MarshalASTFile(file))
for path, file := range files {
root.SetItem(c.AllocaCStr(path), MarshalASTFile(file))
}
return root
}
@@ -22,7 +22,6 @@ func MarshalASTFile(file *ast.File) *cjson.JSON {
decls.AddItem(MarshalASTDecl(decl))
}
root.SetItem(c.Str("path"), cjson.String(c.AllocaCStr(file.Path)))
root.SetItem(c.Str("decls"), decls)
// json:includes,omitempty