@@ -1080,6 +1080,21 @@ def pp_select(self, a, d, xs):
10801080 arg1_pp , indent (2 , compose (to_format ("[" ), arg2_pp , to_format ("]" )))
10811081 )
10821082
1083+ def pp_sexpr (self , a , d , xs ):
1084+ r = []
1085+ sz = 0
1086+ for child in a .children ():
1087+ r .append (self .pp_expr (child , d + 1 , xs ))
1088+ sz = sz + 1
1089+ if sz > self .max_args :
1090+ r .append (self .pp_ellipses ())
1091+ break
1092+ return group (
1093+ indent (
1094+ len ("(" ), compose (to_format ("(" ), seq (r , " " , False ), to_format (")" ))
1095+ )
1096+ )
1097+
10831098 def pp_unary_param (self , a , d , xs , param_on_right ):
10841099 p = a .ast .getOp ()[0 ].toPythonObj ()
10851100 arg = self .pp_expr (a .arg (0 ), d + 1 , xs )
@@ -1194,6 +1209,8 @@ def pp_app(self, a, d, xs):
11941209 return self .pp_uf_apply (a , d , xs )
11951210 elif k in [Kind .APPLY_CONSTRUCTOR , Kind .APPLY_SELECTOR , Kind .APPLY_TESTER ]:
11961211 return self .pp_dt_apply (a , d , xs )
1212+ elif k == Kind .SEXPR :
1213+ return self .pp_sexpr (a , d , xs )
11971214 else :
11981215 return self .pp_prefix (a , d , xs )
11991216
0 commit comments