Skip to content

JuliaTeX/TreeView.jl

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

TreeView

Build Status codecov.io

This is a small package to visualize a graph corresponding to an abstract syntax tree (AST) of a Julia expression. It uses the TikzGraphs.jl package to do the visualization.

Usage

The package is designed to be used within the IJulia notebook.

The simplest usage is @tree <EXPRESSION>, where <EXPRESSION> represents any Julia expression, for example

@tree x^2 + y^2

which gives the following output:

example_tree

See this notebook for usage examples.

Installation prerequisites

You will need to have LaTeX installed on your system, and install the pdf2svg utility; see the TikzGraphs.jl documentation for details.

Author

  • David P. Sanders, Departamento de Física, Facultad de Ciencias, Universidad Nacional Autónoma de México (UNAM)

Acknowledements

Financial support is acknowledged from DGAPA-UNAM PAPIME grants PE-105911 and PE-107114, and DGAPA-UNAM PAPIIT grant IN-117214, and from a CONACYT-Mexico sabbatical fellowship. The author thanks Alan Edelman and the Julia group for hospitality during his sabbatical visit.

In particular, he thanks Jiahao Chen, who, when asked if a package like this existed, replied "why don't you write one?".