From e20fc84d720e68f38fceb53fb2074c11bae886f2 Mon Sep 17 00:00:00 2001 From: Nathan Ringo Date: Tue, 23 Jan 2024 22:40:14 -0600 Subject: Use the bold font for more keywords in the tree. --- discocaml/draw_tree.ml | 14 +++++++++++--- 1 file 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 -- cgit v1.2.3