Skip to content
Snippets Groups Projects
Commit a9879eaa authored by Arnaud LABOUREL's avatar Arnaud LABOUREL
Browse files

Changed variable table to simplify the function calls

parent 4a8ba03a
No related branches found
No related tags found
No related merge requests found
......@@ -5,14 +5,14 @@ import java.util.Map;
import java.util.Optional;
public class VariableTable {
Map<String, PythonValue> variables = new HashMap<>();
Map<String, PythonValue> globalVariables = new HashMap<>();
public void assignVariable(String variableName, PythonValue value) {
variables.put(variableName, value);
globalVariables.put(variableName, value);
}
public Optional<PythonValue> getVariableValue(String variableName) {
PythonValue value = variables.get(variableName);
PythonValue value = globalVariables.get(variableName);
if (value != null) {
return Optional.of(value);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment