Skip to content

Commit

Permalink
Print description in AbstractTrees.printnode()
Browse files Browse the repository at this point in the history
  • Loading branch information
hersle committed Oct 18, 2024
1 parent 35ea296 commit bd917f0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/systems/abstractsystem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2899,11 +2899,12 @@ function Base.showerror(io::IO, e::HybridSystemNotSupportedException)
print(io, "HybridSystemNotSupportedException: ", e.msg)
end

function AbstractTrees.children(sys::ModelingToolkit.AbstractSystem)
function AbstractTrees.children(sys::AbstractSystem)
ModelingToolkit.get_systems(sys)
end
function AbstractTrees.printnode(io::IO, sys::ModelingToolkit.AbstractSystem)
function AbstractTrees.printnode(io::IO, sys::AbstractSystem; describe = true)
print(io, nameof(sys))
describe && !isempty(get_description(sys)) && print(io, ": ", get_description(sys))
end
function Base.IteratorEltype(::Type{<:TreeIterator{ModelingToolkit.AbstractSystem}})
Base.HasEltype()
Expand Down

0 comments on commit bd917f0

Please sign in to comment.