make doFor return null to avoid 'variables of type Void' error
This commit is contained in:
@@ -225,7 +225,9 @@ class SpecialForms {
|
|||||||
return EFor(EBinop(OpIn, loopVarExpr, k.convert(listExp)).withMacroPosOf(wholeExp), k.convert(body)).withMacroPosOf(wholeExp);
|
return EFor(EBinop(OpIn, loopVarExpr, k.convert(listExp)).withMacroPosOf(wholeExp), k.convert(body)).withMacroPosOf(wholeExp);
|
||||||
}
|
}
|
||||||
|
|
||||||
map["doFor"] = forExpr.bind("doFor");
|
map["doFor"] = (wholeExp:ReaderExp, args:Array<ReaderExp>, k:KissState) -> {
|
||||||
|
EBlock([forExpr("doFor", wholeExp, args, k), macro null]).withMacroPosOf(wholeExp);
|
||||||
|
};
|
||||||
map["for"] = (wholeExp:ReaderExp, args:Array<ReaderExp>, k:KissState) -> {
|
map["for"] = (wholeExp:ReaderExp, args:Array<ReaderExp>, k:KissState) -> {
|
||||||
EArrayDecl([forExpr("for", wholeExp, args, k)]).withMacroPosOf(wholeExp);
|
EArrayDecl([forExpr("for", wholeExp, args, k)]).withMacroPosOf(wholeExp);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user