Example #1
0
        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");
        }
Example #2
0
        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;
        }
Example #3
0
 public override void Call(int line, IBreak b)
 {
     //check breakpoints for lines and if so waitone
 }
Example #4
0
 public override void Call(int line, IBreak b)
 {
     b.Break(line);
     Event.WaitOne();
 }
Example #5
0
 public abstract void Call(int line, IBreak b);
Example #6
0
 public override void Call(int line, IBreak b)
 {
     b.Break(line);
     Event.WaitOne();
 }
Example #7
0
 public override void Call(int line, IBreak b)
 {
     //check breakpoints for lines and if so waitone
 }
Example #8
0
 public abstract void Call(int line, IBreak b);
Example #9
0
 public Model3(ISteeringWheel steeringWheel, IBreak breakInstance) : base(steeringWheel, breakInstance)
 {
 }
Example #10
0
 public void SetBreak(IBreak breakInstance)
 {
     this.BrakeInstance = breakInstance;
 }
Example #11
0
 public Car(ISteeringWheel steeringWheel, IBreak breakInstance)
 {
     SetSteeringWheel(steeringWheel);
     SetBreak(breakInstance);
 }