diff options
author | AidenRushbrooke <72034940+AidenRushbrooke@users.noreply.github.com> | 2021-11-06 01:44:14 +0000 |
---|---|---|
committer | AidenRushbrooke <72034940+AidenRushbrooke@users.noreply.github.com> | 2021-11-06 01:44:14 +0000 |
commit | 0c54d7f8cb4b17d80ed21f7a9916ad27a13e34ed (patch) | |
tree | d64267b7da1691bad8797f81188798fb9628a212 /code/Interpreter/Environment.java | |
parent | d3c80f8bd236b1b4ed571ed6b347095efdaa99ed (diff) | |
download | esotericFORTRAN-0c54d7f8cb4b17d80ed21f7a9916ad27a13e34ed.tar.gz esotericFORTRAN-0c54d7f8cb4b17d80ed21f7a9916ad27a13e34ed.zip |
Re-arranged files and added C compilation
Diffstat (limited to 'code/Interpreter/Environment.java')
-rw-r--r-- | code/Interpreter/Environment.java | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/code/Interpreter/Environment.java b/code/Interpreter/Environment.java deleted file mode 100644 index d191bde..0000000 --- a/code/Interpreter/Environment.java +++ /dev/null @@ -1,30 +0,0 @@ -package Interpreter; - -import java.util.HashMap; -import java.util.Map; - -public class Environment { - private final Map<String,Object> variableMap = new HashMap<>(); - - //Maybe check if variable is already defined? - public void defineVariable(String name,Object value){ - variableMap.put(name, value); - } - - public Object getVariable(String name){ - if(variableMap.containsKey(name)){ - return variableMap.get(name); - } - Language.displayError("Undefined Variable"); - throw new Error(); - } - - public void assignVariable(String name,Object value){ - if(variableMap.containsKey(name)){ - variableMap.put(name, value); - return; - } - Language.displayError("Variable undefined"); - throw new Error(); - } -} |