llcppsigfetch:tag expr

This commit is contained in:
luoliwoshang
2024-08-22 15:57:21 +08:00
parent a4f850c0c6
commit eb4d721175
4 changed files with 196 additions and 13 deletions

View File

@@ -140,6 +140,9 @@ func MarshalASTExpr(t ast.Expr) *cjson.JSON {
return cjson.Null()
}
root.SetItem(c.Str("Name"), cjson.String(c.AllocaCStr(d.Name)))
case *ast.TagExpr:
root.SetItem(c.Str("Name"), MarshalASTExpr(d.Name))
root.SetItem(c.Str("Tag"), cjson.Number(float64(d.Tag)))
case *ast.EnumItem:
root.SetItem(c.Str("Name"), MarshalASTExpr(d.Name))
root.SetItem(c.Str("Value"), MarshalASTExpr(d.Value))