[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 52/99: Add macro type in runtime.js
From: |
Christopher Allan Webber |
Subject: |
[Guile-commits] 52/99: Add macro type in runtime.js |
Date: |
Sun, 10 Oct 2021 21:50:58 -0400 (EDT) |
cwebber pushed a commit to branch compile-to-js-merge
in repository guile.
commit ff7fff920d1a26cf01837d0ad5e44ac471ef94e9
Author: Ian Price <ianprice90@googlemail.com>
AuthorDate: Wed Jun 28 10:38:00 2017 +0100
Add macro type in runtime.js
* module/language/js-il/runtime.js
(scheme.Macro): Add type.
(make-syntax-transformer): Add guile procedure.
---
module/language/js-il/runtime.js | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/module/language/js-il/runtime.js b/module/language/js-il/runtime.js
index cccccc6..5a2afa2 100644
--- a/module/language/js-il/runtime.js
+++ b/module/language/js-il/runtime.js
@@ -550,3 +550,15 @@ function scm_mul(self, cont) {
};
def_guile0("*", scm_mul);
+// Macros
+scheme.Macro = function (name, type, binding) {
+ // TODO: prim field?
+ this.name = name;
+ this.type = type;
+ this.binding = binding;
+ return this;
+};
+
+def_guile0("make-syntax-transformer", function (self, cont, name, type,
binding) {
+ return cont(new scheme.Macro(name, type, binding));
+});
- [Guile-commits] 55/99: Implement immediate version of vector primitives., (continued)
- [Guile-commits] 55/99: Implement immediate version of vector primitives., Christopher Allan Webber, 2021/10/10
- [Guile-commits] 62/99: scm_struct_init skips hidden fields., Christopher Allan Webber, 2021/10/10
- [Guile-commits] 59/99: Implement built-in string procedures., Christopher Allan Webber, 2021/10/10
- [Guile-commits] 60/99: Implement struct built-ins., Christopher Allan Webber, 2021/10/10
- [Guile-commits] 70/99: Add `guild jslink' to bundle JS programs, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 75/99: scheme.HashTable uses ES6 Map objects, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 41/99: Fix build of (language cps compile-js), Christopher Allan Webber, 2021/10/10
- [Guile-commits] 45/99: Add #:js-inline? and #:js-flatten? debugging options, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 54/99: Implement structs in runtime.js, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 25/99: Implement call-with-values, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 52/99: Add macro type in runtime.js,
Christopher Allan Webber <=
- [Guile-commits] 51/99: Implement cached-module-box, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 48/99: Rebuild nested scopes for js continuations, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 18/99: Add more types of constants, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 17/99: Implement Optional arguments, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 27/99: values takes multiple arguments, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 28/99: Implement apply correctly, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 38/99: Explicitly test for undefined arguments to handle false values like 0, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 44/99: Update primitives in no-values-primitives, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 35/99: Change local type representation and remove var type, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 42/99: compile-js uses the new cps representation, Christopher Allan Webber, 2021/10/10