Skip to content

how to render only part of tree? #159

@anandijain

Description

@anandijain
julia> tt = Term.Trees.Tree(AbstractFloat)
 Number                      
━━━━━━━━                     
   │                         
   ├── Complex               
   └── Real                  
       ├── Rational          
       ├── AbstractIrrational
       ├── AbstractFloat     
       │   ├── BigFloat      
       │   ├── Float32       
       │   ├── Float64       
       │   └── Float16       
       └── Integer           




julia> tt.nodes[1]

I don't really know any of the internals to Term, but I was looking at PkgDependency and I wanted to look at specific subtrees.

I wanted to make it just work with the AbstractTrees.jl interface, but AbstractTrees.children(t::Term.Trees.Tree) = t.nodes doesn't seem like it works as I expected.

I really like the pretty printing, but it doesn't seem like subtrees are shown the same way

thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions