add end of with at empty word

This commit is contained in:
Daniella / Tove 2022-05-17 19:58:19 +02:00
parent 0711e29283
commit 3296f90ca1

View file

@ -256,7 +256,7 @@ public class ISBPL {
return (idx, words, file, stack) -> {
idx++;
int i = 1;
for(; !words[idx].equals(";"); idx++, i++);
for(; !words[idx].equals(";") && !words[idx].isEmpty(); idx++, i++);
for(idx--; !words[idx].equals("with"); idx--) {
frameStack.get().peek().define(words[idx], stack.pop());
}