Example #1
0
        public static CSharpRelationalExpression operator >=(ExpressionBase left, CSharpIExpression right)
        {
            ICSharpRelationalExpression leftSide  = (ICSharpRelationalExpression)left.AffixTo(OperatorPrecedences.RelationalOperation);
            ICSharpShiftExpression      rightSide = (ICSharpShiftExpression)right.AffixTo(OperatorPrecedences.ShiftOperation);

            return(new CSharpRelationalExpression(leftSide, RelationalOperation.GreaterThanOrEqualTo, rightSide));
        }
Example #2
0
        public static ICSharpnequalityExpression operator !=(ExpressionBase left, CSharpIExpression right)
        {
            ICSharpInequalityExpression leftSide  = (ICSharpInequalityExpression)left.AffixTo(OperatorPrecedences.InequalityOperation);
            ICSharpRelationalExpression rightSide = (ICSharpRelationalExpression)right.AffixTo(OperatorPrecedences.RelationalOperation);

            return(new ICSharpnequalityExpression(leftSide, false, rightSide));
        }
Example #3
0
        public static CSharpRelationalExpression operator <(ExpressionBase left, ExpressionBase right)
        {
            ICSharpRelationalExpression leftSide  = (ICSharpRelationalExpression)left.AffixTo(OperatorPrecedences.RelationalOperation);
            ICSharpShiftExpression      rightSide = (ICSharpShiftExpression)right.AffixTo(OperatorPrecedences.ShiftOperation);

            return(new CSharpRelationalExpression(leftSide, RelationalOperation.LessThan, rightSide));
        }
Example #4
0
        /// <summary><para>Creates a C&#9839; compiler warning, relative to the
        /// abstract model, (level 1) &#35;184:</para><para>The given expression is never of the provided ({0}) type</para></summary>
        public static ICompilerSourceModelWarning <ICSharpRelationalExpression> WarningCS0184(ICSharpRelationalExpression relationalConstant)
        {
            var start = relationalConstant.Start ?? LineColumnPair.Zero;
            var end   = relationalConstant.End ?? LineColumnPair.Zero;

            return(new CompilerSourceModelWarning <ICSharpRelationalExpression>(CS0184, relationalConstant, relationalConstant.Location, start, end, relationalConstant.ToString()));
        }