Private
Public Access
Added safe checking
This commit is contained in:
1 parent
6f9083ab6f
commit
3a979f8faa
1 file changed
+3
-2
+3
-2
@@ -22,10 +22,11 @@ namespace Advanced_Software_Engineering.Verbs.Value {
|
|||||||
//Seperate the assignment from the variables
|
//Seperate the assignment from the variables
|
||||||
List<string> assignmentList = SettingsAndHelperFunctions.StripStringArray(assignment.Split("="[0]));
|
List<string> assignmentList = SettingsAndHelperFunctions.StripStringArray(assignment.Split("="[0]));
|
||||||
name = assignmentList[0];
|
name = assignmentList[0];
|
||||||
|
if (drawer.CheckVariableExists(name)) throw new Exception("Declaration failed. " + name + " has been declared before");
|
||||||
value = ValueFactory.CreateValue(assignmentList[1], type);
|
value = ValueFactory.CreateValue(assignmentList[1], type);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
throw new NotImplementedException();
|
//boolean here
|
||||||
|
throw new NotImplementedException("Booleans cannot be parsed yet");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user