mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 20:00:19 +02:00
Add macro type in runtime.js
* module/language/js-il/runtime.js (scheme.Macro): Add type. (make-syntax-transformer): Add guile procedure.
This commit is contained in:
parent
b3c0fcdb25
commit
ff7fff920d
1 changed files with 12 additions and 0 deletions
|
@ -550,3 +550,15 @@ function scm_mul(self, cont) {
|
||||||
};
|
};
|
||||||
def_guile0("*", scm_mul);
|
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));
|
||||||
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue