add with keyword
This commit is contained in:
parent
4fbaf943dd
commit
0711e29283
1 changed files with 10 additions and 0 deletions
10
ISBPL.java
10
ISBPL.java
|
@ -252,6 +252,16 @@ public class ISBPL {
|
|||
ISBPL.gErrorStream.println("Constructing type " + type);
|
||||
return i.get();
|
||||
};
|
||||
case "with":
|
||||
return (idx, words, file, stack) -> {
|
||||
idx++;
|
||||
int i = 1;
|
||||
for(; !words[idx].equals(";"); idx++, i++);
|
||||
for(idx--; !words[idx].equals("with"); idx--) {
|
||||
frameStack.get().peek().define(words[idx], stack.pop());
|
||||
}
|
||||
return idx + i;
|
||||
};
|
||||
case "string!":
|
||||
return (idx, words, file, stack) -> {
|
||||
idx++;
|
||||
|
|
Loading…
Add table
Reference in a new issue