add getfile native to ISBPL.java, add comment support for construct blocks
This commit is contained in:
parent
83344809f0
commit
0176503ece
1 changed files with 9 additions and 0 deletions
|
@ -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());
|
||||
|
|
Loading…
Add table
Reference in a new issue