Skip to content

Commit 43b755a

Browse files
committed
new print method
1 parent 9a10888 commit 43b755a

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/node.jl

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,8 +306,14 @@ function Base.show(io::IO, node::Node)
306306
@printf(io, "%s(<%s>)", prefix, desc)
307307
end
308308

309-
function Base.print(io::IO, node::Node)
310-
dump_node(io, node, false)
309+
function Base.print(io::IO, node::Node, formatting::Bool = true)
310+
show(node)
311+
println(" \n")
312+
dump_node(io, node, formatting)
313+
end
314+
315+
function Base.print(node::Node)
316+
print(stdout, node)
311317
end
312318

313319
"""

0 commit comments

Comments
 (0)