Hi,

Here's a one-character patch that gives more complete information to any
registered compiler-syntax hook.

Cheers,

Evan
>From 3c957e44ace9f3304a4dd6e450cf6959a3de7cbb Mon Sep 17 00:00:00 2001
From: Evan Hanson <[email protected]>
Date: Fri, 19 Apr 2019 18:27:25 +1200
Subject: [PATCH] Pass full macro name to `##sys#compiler-syntax-hook'

Previously, the unresolved macro name passed to the hook, meaning it
didn't include a module namespace and it was impossible to differentiate
two macros of the same name from different modules. This change just
passes the fully-qualified name of the syntax to the hook instead so
that reported compiler-syntax statistics ("-debug S") are more accurate.
---
 expand.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/expand.scm b/expand.scm
index c5ec3bcb..277c035b 100644
--- a/expand.scm
+++ b/expand.scm
@@ -299,7 +299,7 @@
 			 (cond ((eq? result exp) (expand head exp head2))
 			       (else
 				(when ##sys#compiler-syntax-hook
-				  (##sys#compiler-syntax-hook head result))
+				  (##sys#compiler-syntax-hook head2 result))
 				(loop result))))))
 		    [else (expand head exp head2)] ) )
 	    (values exp #f) ) )
-- 
2.11.0

_______________________________________________
Chicken-hackers mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/chicken-hackers

Reply via email to