add lambda expression support

This commit is contained in:
Daniella / Tove 2022-04-09 02:44:30 +02:00
parent 67c9df0726
commit 645a78bead

View file

@ -127,6 +127,13 @@ public class ISBPL {
}
return i.get();
};
case "{":
return (idx, words, file, stack) -> {
AtomicInteger i = new AtomicInteger(idx);
ISBPLCallable block = readBlock(i, words, file, false);
stack.push(new ISBPLObject(getType("func"), block));
return i.get();
};
case "fork":
return (idx, words, file, stack) -> {
idx++;