aboutsummaryrefslogtreecommitdiff
path: root/src/guile/skribilo/evaluator.scm
diff options
context:
space:
mode:
Diffstat (limited to 'src/guile/skribilo/evaluator.scm')
-rw-r--r--src/guile/skribilo/evaluator.scm12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/guile/skribilo/evaluator.scm b/src/guile/skribilo/evaluator.scm
index 703186c..616144d 100644
--- a/src/guile/skribilo/evaluator.scm
+++ b/src/guile/skribilo/evaluator.scm
@@ -50,7 +50,17 @@
(define *skribe-load-options* '())
(define (%evaluate expr)
- (eval expr (current-module)))
+ (let ((result (eval expr (current-module))))
+ (if (or (ast? result) (markup? result))
+ (let ((file (source-property expr 'filename))
+ (line (source-property expr 'line))
+ (column (source-property expr 'column)))
+ (format #t "~%~%*** source props for `~a': ~a~%~%"
+ result (source-properties expr))
+ (slot-set! result 'loc
+ (make <location>
+ :file file :line line :pos column))))
+ result))