Login
7 branches 0 tags
Benjamin Vincent Schulenburg [symbol-table] now returns symbols instead of keywords 6f3ef35 3 years ago 479 Commits
nujel / stdlib / core / stacktrace.nuj
; Nujel - Copyright (C) 2020-2021 - Benjamin Vincent Schulenburg
; This project uses the MIT license, a copy should be included under /LICENSE

[defun describe/closure [c i]
       [when c
             [def info [closure c]]
             [when [and info [tree/get info :call]]
                   [cat [ansi-blue [cat [int i] "# " [str/write c]]]
                        " - "
                        [str/write [tree/get info :data]]
                        "\r\n"
                        [describe/closure [closure-caller c] [+ [int i] 1]]]]]]

[defun stacktrace []
          [display [describe/closure [closure-caller [current-lambda]]]]]