guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] 36/99: Handle more identifier characters


From: Christopher Allan Webber
Subject: [Guile-commits] 36/99: Handle more identifier characters
Date: Sun, 10 Oct 2021 21:50:52 -0400 (EDT)

cwebber pushed a commit to branch compile-to-js-merge
in repository guile.

commit 88c052214f257525e4c64277baa2ea23129ce060
Author: Ian Price <ianprice90@googlemail.com>
AuthorDate: Tue Jun 23 15:46:26 2015 +0100

    Handle more identifier characters
---
 module/language/js-il/compile-javascript.scm | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/module/language/js-il/compile-javascript.scm 
b/module/language/js-il/compile-javascript.scm
index 3ef9a95..2645b4c 100644
--- a/module/language/js-il/compile-javascript.scm
+++ b/module/language/js-il/compile-javascript.scm
@@ -74,8 +74,17 @@
               ((#\+) (display "_a" port))
               ((#\\) (display "_b" port))
               ((#\/) (display "_f" port))
+              ((#\%) (display "_c" port))
+              ((#\$) (display "_d" port))
+              ((#\~) (display "_t" port))
+              ((#\^) (display "_i" port))
+              ((#\&) (display "_j" port))
+              ((#\:) (display "_k" port))
+              ((#\@) (display "_m" port))
+              ;; unused: noqrvxy
               (else
-               (throw 'bad-id-char  c)))))
+               (display "_z" port)
+               (display (char->integer c) port)))))
       name))))
 
 (define (bind-rest-args rest num-drop)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]