Fixed bug where colours wouldn't work

This commit is contained in:
Lukasz Baldyga committed 2020-11-30 12:08:02 +00:00
1 parent f3c4f6dbf1
commit f8ea7807be
1 file changed
+13 -6
@@ -131,12 +131,19 @@ namespace Advanced_Software_Engineering.Verbs.Value {
return ValueFactory.CreateValue(text, "int"); return ValueFactory.CreateValue(text, "int");
} catch (Exception) { } } catch (Exception) { }
} }
//Check if string is a double //Check if string is a double
else { else {
try { try {
return ValueFactory.CreateValue(text, "double"); return ValueFactory.CreateValue(text, "double");
} catch (Exception) { } } catch (Exception) { }
} }
//Check if color
try {
return ValueFactory.CreateValue(text, "color");
} catch (Exception) { }
//check for expression //check for expression
if (storage != null) { if (storage != null) {
try { try {
@@ -167,14 +174,14 @@ namespace Advanced_Software_Engineering.Verbs.Value {
} }
} catch (Exception) { } } catch (Exception) { }
} }
} else {
//Check if color
try {
return ValueFactory.CreateValue(text, "color");
} catch (Exception) { }
} }
//Check if color
try {
return ValueFactory.CreateValue(text, "color");
} catch (Exception) { }
} else { } else {
//Check if string is a bool TODO //Check if string is a bool
//Check if expression //Check if expression
if (storage != null) { if (storage != null) {