Split debug parameter into non-false and true levels.
authorTony Garnock-Jones <tonygarnockjones@gmail.com>
Sun, 03 Jul 2011 18:42:54 -0400
changeset 35 5a234972f72a
parent 34 ca269f5c30b3
child 36 ae93c5bd6657
Split debug parameter into non-false and true levels.
ometa.scm
--- a/ometa.scm	Sun Jul 03 18:42:34 2011 -0400
+++ b/ometa.scm	Sun Jul 03 18:42:54 2011 -0400
@@ -323,7 +323,7 @@
   (define action-tab (make-hash-table equal?))
 
   (define (e exp env input ks kf)
-    (when (*ometa-debug*)
+    (when (eq? (*ometa-debug*) #t)
 	(pretty-print `(
 			(exp ,exp)
 			(env ,(nonshared-env env))
@@ -335,6 +335,9 @@
 			)))
     (case (car exp)
       ((apply)
+       (when (*ometa-debug*)
+	 (pretty-print `(apply (exp ,exp)
+			       (pos ,(input-stream-position input)))))
        (let search-for-production ((production-exp (cadr exp)))
 	 (eval-host production-exp env
 	   (lambda (dummy-pos production)