Don't double-expand macros

This commit is contained in:
2020-12-30 19:44:46 -07:00
parent 0a949b825b
commit 404780e89e

View File

@@ -134,7 +134,7 @@ class Kiss {
return switch (exp.def) {
case CallExp({pos: _, def: Symbol(mac)}, args) if (macros.exists(mac)):
var expandedExp = macros[mac](exp, args, k);
if (expandedExp != null) readerExpToField(macros[mac](expandedExp, args, k), k, errorIfNot) else null;
if (expandedExp != null) readerExpToField(expandedExp, k, errorIfNot) else null;
case CallExp({pos: _, def: Symbol(formName)}, args) if (fieldForms.exists(formName)):
fieldForms[formName](exp, args, k);
default: