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