diff options
author | David Thompson <dthompson2@worcester.edu> | 2023-04-30 10:21:31 -0400 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2023-04-30 10:28:17 -0400 |
commit | 19960570a391672f909c70ca973ce662238fd5c2 (patch) | |
tree | db6cda08508e535c00d395966874373c6eebc9b8 | |
parent | d17a18a52d6c1fafef5e0751e69a2fa0728977f3 (diff) |
Add REPL printer for assets.
-rw-r--r-- | catbird/repl.scm | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/catbird/repl.scm b/catbird/repl.scm index c08ef20..7ca62ee 100644 --- a/catbird/repl.scm +++ b/catbird/repl.scm @@ -19,6 +19,7 @@ ;; ;;; Code: (define-module (catbird repl) + #:use-module (catbird asset) #:use-module (catbird line-editor) #:use-module (catbird kernel) #:use-module (catbird mode) @@ -101,6 +102,15 @@ (loop (+ i 1))))))) ,(make <label> #:text ")")))) +(define-method (repl-print (asset <asset>)) + (make <horizontal-container> + #:children + (list (make <label> + #:text (format #f "#<~a " (class-name (class-of asset)))) + (repl-print (artifact asset)) + (make <label> + #:text ">")))) + (define <texture> (class-of null-texture)) (define-method (repl-print (texture <texture>)) (make <sprite> #:texture texture)) |