/// <summary> /// Adds the converted variable and value to the assignments dictionary. /// </summary> /// <param name="variable">Single-character variable.</param> /// <param name="boolValue">Value that matches the string form of a boolean.</param> /// <param name="convertedAssignments">List to add the converted variable-value pair to.</param> /// <returns></returns> private Dictionary <VariableExp, bool> ConvertVariableAssignment(char variable, string boolValue, Dictionary <VariableExp, bool> convertedAssignments) { bool convertedValue = (boolValue.ToLower() == TRUE); VariableExp x = new VariableExp(variable); convertedAssignments.Add(x, convertedValue); return(convertedAssignments); }
public void Assign(VariableExp variableExp, bool value) { if (!_map.ContainsKey(variableExp.Name)) { _map.Add(variableExp.Name, value); } else { _map[variableExp.Name] = value; } }