add string blocks

This commit is contained in:
Daniella 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)); stack.push(new ISBPLObject(getType("int"), type.id));
return i.get(); 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: default:
return null; return null;
} }