Пример #1
0
 public override void SecondSemanticCheck(List <SemanticError> errors, Scope scope)
 {
     RightOperand.SecondSemanticCheck(errors, scope);
     LeftOperand.SecondSemanticCheck(errors, scope);
     if (LeftOperand.StaticType.Text != "Int" || RightOperand.StaticType.Text != "Int")
     {
         errors.Add(new SemanticError(Line, Column, TypeError.InconsistentType));
     }
     if (!scope.IsDefinedType("Bool", out StaticType))
     {
         errors.Add(new SemanticError(Line, Column, TypeError.ClassNotDefine));
     }
 }