llcppsigfetch:lvalue & rvalue refer

This commit is contained in:
luoliwoshang
2024-08-22 12:15:06 +08:00
parent 0a8e25b405
commit a4f850c0c6
4 changed files with 99 additions and 0 deletions

View File

@@ -146,6 +146,10 @@ func MarshalASTExpr(t ast.Expr) *cjson.JSON {
case *ast.BasicLit:
root.SetItem(c.Str("Kind"), cjson.Number(float64(d.Kind)))
root.SetItem(c.Str("Value"), cjson.String(c.AllocaCStr(d.Value)))
case *ast.LvalueRefType:
root.SetItem(c.Str("X"), MarshalASTExpr(d.X))
case *ast.RvalueRefType:
root.SetItem(c.Str("X"), MarshalASTExpr(d.X))
case *ast.PointerType:
root.SetItem(c.Str("X"), MarshalASTExpr(d.X))
case *ast.ArrayType: