unreserve args as keyword in macro definitions

This commit is contained in:
2021-06-26 11:39:42 -06:00
parent 6d970d3b4a
commit 560825fbf5
2 changed files with 2 additions and 2 deletions

View File

@@ -272,7 +272,7 @@ class Helpers {
// TODO if an internal evaluation ever needs to end before its outer evaluation is done,
// this will cause problems because the old args will be overwritten and lost
interps[-1].variables.set("args", args); // trippy
interps[-1].variables.set("__args__", args); // trippy
if (args != null) {
for (arg => value in args) {
interps[-1].variables.set(arg, value);

View File

@@ -234,7 +234,7 @@ class Kiss {
case Quasiquote(innerExp):
// This statement actually turns into an HScript expression before running
macro {
Helpers.evalUnquotes($v{innerExp}, k, args).def;
Helpers.evalUnquotes($v{innerExp}, k, __args__).def;
};
default:
throw CompileError.fromExp(exp, 'conversion not implemented');