@@ -140,9 +140,14 @@ function string_tree(
140140 f_variable:: F1 = string_variable,
141141 f_constant:: F2 = string_constant,
142142 variable_names:: Union{AbstractVector{<:AbstractString},Nothing} = nothing ,
143+ pretty:: Union{Bool,Nothing} = nothing , # Not used, but can be used by other types
143144 # Deprecated
145+ raw:: Union{Bool,Nothing} = nothing ,
144146 varMap= nothing ,
145147):: String where {T,F1<: Function ,F2<: Function }
148+ ! isnothing (raw) &&
149+ Base. depwarn (" `raw` is deprecated; use `pretty` instead" , :string_tree )
150+ pretty = @something (pretty, _not (raw), false )
146151 variable_names = deprecate_varmap (variable_names, varMap, :string_tree )
147152 raw_output = tree_mapreduce (
148153 let f_constant = f_constant,
@@ -186,14 +191,22 @@ for io in ((), (:(io::IO),))
186191 f_variable:: F1 = string_variable,
187192 f_constant:: F2 = string_constant,
188193 variable_names:: Union{AbstractVector{<:AbstractString},Nothing} = nothing ,
194+ pretty:: Union{Bool,Nothing} = nothing , # Not used, but can be used by other types
189195 # Deprecated
196+ raw:: Union{Bool,Nothing} = nothing ,
190197 varMap= nothing ,
191198 ) where {F1<: Function ,F2<: Function }
199+ ! isnothing (raw) &&
200+ Base. depwarn (" `raw` is deprecated; use `pretty` instead" , :print_tree )
201+ pretty = @something (pretty, _not (raw), false )
192202 variable_names = deprecate_varmap (variable_names, varMap, :print_tree )
193203 return println (
194- $ (io... ), string_tree (tree, operators; f_variable, f_constant, variable_names)
204+ $ (io... ),
205+ string_tree (tree, operators; f_variable, f_constant, variable_names, pretty),
195206 )
196207 end
197208end
209+ _not (:: Nothing ) = nothing
210+ _not (x) = ! x
198211
199212end
0 commit comments