Formatting

This commit is contained in:
Lukasz Baldyga committed 2020-11-30 10:37:58 +00:00
1 parent 351bf3f1fb
commit 8835d32d8f
1 file changed
+6 -6
@@ -126,19 +126,19 @@ namespace Advanced_Software_Engineering.Verbs.Value {
if (!text.Contains("=")) { if (!text.Contains("=")) {
if (!text.Contains("#")) { if (!text.Contains("#")) {
//Check if string is a number //Check if string is a number
if (!text.Contains(".")) if (!text.Contains(".")) {
try { try {
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 for expression //check for expression
if (storage != null) if (storage != null) {
try { try {
string value = text; string value = text;
//seperate assignment characters from everything else //seperate assignment characters from everything else
@@ -165,8 +165,8 @@ namespace Advanced_Software_Engineering.Verbs.Value {
IValue value2 = ValueFactory.CreateValue(storage, assignmentStrings[2]); IValue value2 = ValueFactory.CreateValue(storage, assignmentStrings[2]);
return new ExpressionValue(value1, value2, op); return new ExpressionValue(value1, value2, op);
} }
} catch (Exception) { } } catch (Exception) { }
}
} }
//Check if color //Check if color