add string blocks

This commit is contained in:
Daniella / Tove 2022-05-14 18:33:23 +02:00
parent b41c079c67
commit 23f974a026

View file

@ -245,6 +245,16 @@ public class ISBPL {
stack.push(new ISBPLObject(getType("int"), type.id));
return i.get();
};
case "string!":
return (idx, words, file, stack) -> {
AtomicInteger i = new AtomicInteger(idx);
String s = "";
for(String w : readBlock(i, words, file))
s += w + " ";
s = s.substring(0, s.length() - 1);
stack.push(toISBPLString(s));
return i.get();
};
default:
return null;
}