fix some isbpl.java

This commit is contained in:
Daniella / Tove 2022-03-08 10:22:26 +01:00
parent f377560e21
commit 502632aeb2

View file

@ -272,7 +272,6 @@ public class ISBPL {
case "reload": case "reload":
func = (File file) -> { func = (File file) -> {
String filepath = getFilePathForInclude((Stack<ISBPLObject>) stack, file); String filepath = getFilePathForInclude((Stack<ISBPLObject>) stack, file);
if(included.contains(filepath)) {
File f = new File(filepath).getAbsoluteFile(); File f = new File(filepath).getAbsoluteFile();
try { try {
interpret(f, readFile(f), stack); interpret(f, readFile(f), stack);
@ -280,7 +279,6 @@ public class ISBPL {
catch (IOException e) { catch (IOException e) {
throw new ISBPLError("IO", "Couldn't find file " + filepath + " required by include keyword."); throw new ISBPLError("IO", "Couldn't find file " + filepath + " required by include keyword.");
} }
}
}; };
break; break;
case "include": case "include":
@ -794,6 +792,7 @@ public class ISBPL {
objects[i++] = new ISBPLObject(getType("array"), strings.toArray(new ISBPLObject[0])); objects[i++] = new ISBPLObject(getType("array"), strings.toArray(new ISBPLObject[0]));
} }
ISBPLObject array = new ISBPLObject(getType("array"), objects); ISBPLObject array = new ISBPLObject(getType("array"), objects);
stack.push(array);
}; };
break; break;
case "stacksize": case "stacksize":