Removed strict types

This commit is contained in:
Lukasz Baldyga committed 2020-11-29 10:54:07 +00:00
1 parent 5844e489da
commit 31ad37aa69
2 files changed
+4 -7

No files matched your search

@@ -45,7 +45,7 @@ namespace Advanced_Software_Engineering.Verbs.Value {
return true; return true;
} }
public DeclareVariable(Drawer drawer, string type, string assignment) { public DeclareVariable(Drawer drawer, string assignment) {
this.drawer = drawer; this.drawer = drawer;
//seperate assignment characters from everything else //seperate assignment characters from everything else
@@ -32,19 +32,16 @@ namespace Advanced_Software_Engineering {
if (drawer.CheckVariableExists(command)) { if (drawer.CheckVariableExists(command)) {
if (commandParameters.Length == 1) { if (commandParameters.Length == 1) {
//return new UpdateVariable(drawer, ); return new UpdateVariable(drawer, command, ValueFactory.CreateValue(drawer, commandParameters[0]));
} else throw new Exception(command + "needs something to be assigned to it"); } else throw new Exception(command + "needs something to be assigned to it");
} }
//process declarations //process declarations
if (!(commandParameters == null)) if (!(commandParameters == null))
switch (command) { switch (command) {
case "int": case "var":
case "double":
case "bool":
case "color":
if (commandParameters.Length == 1) { if (commandParameters.Length == 1) {
return new DeclareVariable(drawer, command, commandParameters[0]); return new DeclareVariable(drawer, commandParameters[0]);
} else throw new Exception(command + "s need to be initialised"); } else throw new Exception(command + "s need to be initialised");
default: default: