示例#1
0
        public bool Visit(Unary_Expression expression)
        {
            bool   result       = expression.Internal.Accept <bool>(this);
            QSType operatorType = expression.GetType(this._typeMem);
            QSType internalType = expression.GetInternalType(this._typeMem);

            if (!operatorType.IsCompatible(internalType))
            {
                // type of unary is not compatible with it's expression
                result = false;
                this._errorList.Add(new UnaryOperatorTypeMismatch(internalType, expression.GetOperator(), expression.Line));
            }
            return(result);
        }
示例#2
0
 public object Visit(Unary_Expression expression)
 {
     throw new NotImplementedException();
 }