aboutsummaryrefslogtreecommitdiff
path: root/discocaml/draw_tree.ml
diff options
context:
space:
mode:
authorNathan Ringo <nathan@remexre.com>2024-01-23 22:40:14 -0600
committerNathan Ringo <nathan@remexre.com>2024-01-23 22:40:14 -0600
commite20fc84d720e68f38fceb53fb2074c11bae886f2 (patch)
tree17fd3202543740bf94c59523f3d98847d49f0684 /discocaml/draw_tree.ml
parent856f366c640c44f35a0d06e707e354caeea9d836 (diff)
Use the bold font for more keywords in the tree.
Diffstat (limited to 'discocaml/draw_tree.ml')
-rw-r--r--discocaml/draw_tree.ml14
1 files changed, 11 insertions, 3 deletions
diff --git a/discocaml/draw_tree.ml b/discocaml/draw_tree.ml
index 685ef52..005633f 100644
--- a/discocaml/draw_tree.ml
+++ b/discocaml/draw_tree.ml
@@ -12,11 +12,19 @@ let add_node (fmt : Format.formatter) (i : expr index) (expr : expr) : unit =
Format.fprintf fmt
" expr%d [fontname=\"CMU Typewriter Text Bold\", label=\"::\"];\n"
i.index
- | If (_, _, _) -> Format.fprintf fmt " expr%d [label=\"if\"];\n" i.index
+ | If (_, _, _) ->
+ Format.fprintf fmt
+ " expr%d [fontname=\"CMU Typewriter Text Bold\", label=\"if\"];\n"
+ i.index
| Int n -> Format.fprintf fmt " expr%d [label=\"%d\"];\n" i.index n
- | Lam _ -> Format.fprintf fmt " expr%d [label=\"λ\"];\n" i.index
+ | Lam _ ->
+ Format.fprintf fmt
+ " expr%d [fontname=\"CMU Typewriter Text Bold\", label=\"λ\"];\n"
+ i.index
| Let (recursive, _, _, _) ->
- Format.fprintf fmt " expr%d [label=\"%s\"];\n" i.index
+ Format.fprintf fmt
+ " expr%d [fontname=\"CMU Typewriter Text Bold\", label=\"%s\"];\n"
+ i.index
(if recursive then "letrec" else "let")
| Nil ->
Format.fprintf fmt