add getfile native to ISBPL.java, add comment support for construct blocks

This commit is contained in:
Daniella 2022-05-13 19:14:08 +02:00
parent 83344809f0
commit 0176503ece

View file

@ -216,6 +216,10 @@ public class ISBPL {
// Ignore empty
if(word2.equals("")) continue;
if(word2.equals("\"")) continue;
if(word2.equals("#")) {
j++;
continue;
}
if(definingMethods) {
AtomicInteger idx2 = new AtomicInteger(++j);
@ -384,6 +388,11 @@ public class ISBPL {
frameStack.get().get(frameStack.get().size() - 1 - ((int) i.object)).resolve(toJavaString(s)).call(stack);
};
break;
case "getfile":
func = (Stack<ISBPLObject> stack) -> {
stack.push(toISBPLString(fileStack.get().peek().getAbsolutePath()));
};
break;
case "reload":
func = (Stack<ISBPLObject> stack) -> {
String filepath = getFilePathForInclude((Stack<ISBPLObject>) stack, fileStack.get());