public override void CheckSemantics(Scope scope, Report report) { LanguageNode node = Parent as LanguageNode; while (node != null && !(node is IBreak)) { if (node is ExprSeqNode) { node.returnType = scope.FindType("void"); (node as ExprSeqNode).existsBreak = true; } if (node is FunctionDecNode) { report.Add(Line, CharPositionInLine, "Ilegal Break"); returnType = scope.FindType("error"); return; } node = node.Parent as LanguageNode; } if (node == null) { report.Add(Line, CharPositionInLine, "Ilegal Break"); returnType = scope.FindType("error"); return; } loop = node as IBreak; returnType = scope.FindType("void"); }
public Step(DebugInfo debugInfo, int key, string name, string description, string formula, string value, string situation, IBreak @break, IEnumerable <IChoice> choices, IEnumerable <IEvaluateTable> evaluate) { if (string.IsNullOrWhiteSpace(name)) { throw new System.ArgumentException("message", nameof(name)); } if (string.IsNullOrWhiteSpace(description)) { //description is not required description = name; } DebugInfo = debugInfo; Key = key; Name = name; Description = description; Formula = formula; Value = value; Situation = situation; Break = @break; Choices = choices; EvaluateTables = evaluate; }
public override void Call(int line, IBreak b) { //check breakpoints for lines and if so waitone }
public override void Call(int line, IBreak b) { b.Break(line); Event.WaitOne(); }
public abstract void Call(int line, IBreak b);
public Model3(ISteeringWheel steeringWheel, IBreak breakInstance) : base(steeringWheel, breakInstance) { }
public void SetBreak(IBreak breakInstance) { this.BrakeInstance = breakInstance; }
public Car(ISteeringWheel steeringWheel, IBreak breakInstance) { SetSteeringWheel(steeringWheel); SetBreak(breakInstance); }