Pretty-patterns shows words at ends of splatterns

This commit is contained in:
Scott Richmond 2024-07-14 14:41:53 -04:00
parent 9ddb43a30f
commit a6c899a85f

View File

@ -129,7 +129,7 @@
:typed (string (show-patt (get-in x [:data 1])) " as " (show-patt (get-in x [:data 0]))) :typed (string (show-patt (get-in x [:data 1])) " as " (show-patt (get-in x [:data 0])))
:interpolated (get-in x [:token :lexeme]) :interpolated (get-in x [:token :lexeme])
:string (get-in x [:token :lexeme]) :string (get-in x [:token :lexeme])
:splat (string "..." (when (x :splatted) (show-patt (x :splatted)))) :splat (string "..." (when (x :data) (show-patt (x :data))))
(error (string "cannot show pattern of unknown type " (x :type))))) (error (string "cannot show pattern of unknown type " (x :type)))))
(defn pretty-patterns [fnn] (defn pretty-patterns [fnn]