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 699fa62 commit 77025da
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 @@ -2901,11 +2901,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 77025da

Please sign in to comment.