Skip to content

Commit

Permalink
Updating readme and changing the flowgraph png render to a svg render.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathansty committed Feb 21, 2019
1 parent 132b7ce commit bcd979d
Show file tree
Hide file tree
Showing 3 changed files with 187 additions and 11 deletions.
25 changes: 14 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,36 +57,39 @@ USAGE:
cargo inspect [FLAGS] [OPTIONS] [INPUT_FILE]
FLAGS:
-h, --help
-h, --help
Prints help information
--list-themes
--list-themes
Should we list all pretty printer themes?
--plain
--plain
Don't highlight output
-V, --version
-V, --version
Prints version information
-v, --verbose
-v, --verbose
Print the original code as a comment above the desugared code
OPTIONS:
--theme <THEME>
--theme <THEME>
Specify a theme override for the pretty printer
--diff <files>
--diff <files>
Diff input files
--unpretty <unpretty>
--format <format>
Override for the format that gets outputted when the `unpretty` mode is set to `flowgraph` [default: svg]
--unpretty <unpretty>
rustc "unpretty" parameters
*Note*: For `--unpretty=flowgraph=[symbol]` you need to have `dot` on your PATH. [default: hir]
ARGS:
<INPUT_FILE>
<INPUT_FILE>
Input file
```

Expand Down Expand Up @@ -156,7 +159,7 @@ Oh, and if you have [`graphviz`](https://graphviz.gitlab.io/download/) installed
cargo inspect --unpretty=flowgraph=main examples/if_let.rs
```

![Please run the command to reproduce the desugared output](assets/if-let-flowgraph.png)
![Please run the command to reproduce the desugared output](assets/if-let-flowgraph.svg)

### More examples

Expand Down
Binary file removed assets/if-let-flowgraph.png
Binary file not shown.
173 changes: 173 additions & 0 deletions assets/if-let-flowgraph.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit bcd979d

Please sign in to comment.