Compare commits
3 commits
Author | SHA1 | Date | |
---|---|---|---|
9ce7bf5b9d | |||
5e74e8baf7 | |||
93b88a01eb |
2 changed files with 9 additions and 5 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -3,3 +3,6 @@ test*.isbpl
|
||||||
*.jar
|
*.jar
|
||||||
*.bf.isbpl
|
*.bf.isbpl
|
||||||
rust-interpreter
|
rust-interpreter
|
||||||
|
.idea
|
||||||
|
*.iml
|
||||||
|
out
|
||||||
|
|
|
@ -2485,7 +2485,7 @@ class ISBPLFrame {
|
||||||
public ISBPL context;
|
public ISBPL context;
|
||||||
public ISBPLFrame parent;
|
public ISBPLFrame parent;
|
||||||
public HashMap<String, ISBPLCallable> map = new HashMap<>();
|
public HashMap<String, ISBPLCallable> map = new HashMap<>();
|
||||||
public HashMap<Object, ISBPLObject> variables = new HashMap<>();
|
public HashMap<String, ISBPLObject> variables = new HashMap<>();
|
||||||
public String name;
|
public String name;
|
||||||
|
|
||||||
public ISBPLFrame(String name, ISBPL context) {
|
public ISBPLFrame(String name, ISBPL context) {
|
||||||
|
@ -2518,10 +2518,9 @@ class ISBPLFrame {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void define(String name, ISBPLObject value) {
|
public void define(String name, ISBPLObject value) {
|
||||||
Object var = new Object();
|
variables.put(name, value);
|
||||||
variables.put(var, value);
|
add(name, (stack) -> stack.push(variables.get(name)));
|
||||||
add(name, (stack) -> stack.push(variables.get(var)));
|
add("=" + name, (stack) -> variables.put(name, stack.pop()));
|
||||||
add("=" + name, (stack) -> variables.put(var, stack.pop()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public HashMap<String, ISBPLCallable> all() {
|
public HashMap<String, ISBPLCallable> all() {
|
||||||
|
@ -2530,3 +2529,5 @@ class ISBPLFrame {
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public interface
|
Loading…
Reference in a new issue