private bool verifyAndCompileCode() { List <string> codeLines = getLinesFromString(ProgramCode); MovementCmnds.Clear(); ConditionalCmnds.Clear(); bool result = verifyCodeBegin(codeLines) && verifyCodeEnd(codeLines) && verifyAndCompileCodeLines(codeLines); return(result); }
private bool verifyAndCompileIfStatement(string v) { if (Regex.Matches(v, ifPattern).Count != 1) { return(false); } ConditionalDirections direction = getConditionalDirectionFromCodeLine(v); ConditionalLights led = getLedFromCodeLine(v); ActuatorState state = getLedStateFromCodeLine(v); ConditionalCmnds.Add(new ConditionalLightCommand(direction, led, state)); return(true); }
// Registering View Items Commands into bindinglist public void AddToConditionalCommandList(ConditionalLightCommand cc) { ConditionalCmnds.Add(cc); }