From 75065b6540212f9989ecc5e535e932938eeb7d68 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sun, 3 Feb 2008 21:18:23 +0100 Subject: Bind the nodes returned by nodes. * src/guile/skribilo/resolve.scm (do-resolve!): Use `ast-fold' to bind all nodes in RES and assign them the proper location. --- src/guile/skribilo/resolve.scm | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/guile/skribilo/resolve.scm b/src/guile/skribilo/resolve.scm index 6405ebd..f902f69 100644 --- a/src/guile/skribilo/resolve.scm +++ b/src/guile/skribilo/resolve.scm @@ -202,9 +202,15 @@ (let* ((proc (slot-ref node 'proc)) (res (proc node engine env)) - (loc (ast-loc node))) - (when (ast? res) - (ast-loc-set! res loc)) + (loc (ast-loc node)) + (doc (ast-document node))) + (ast-fold (lambda (node result) + (if (markup? node) + (document-bind-node! doc node)) + (if (ast? node) + (ast-loc-set! node loc))) + #t ;; unused + res) (debug-item "res=" res) (*unresolved* #t) res)))) -- cgit v1.2.3