463 lines
13 KiB
C#
463 lines
13 KiB
C#
using System;
|
|
|
|
namespace Microsoft.CodeAnalysis.CSharp;
|
|
|
|
[Flags]
|
|
internal enum BinaryOperatorKind
|
|
{
|
|
TypeMask = 0xFF,
|
|
Int = 5,
|
|
UInt = 6,
|
|
Long = 7,
|
|
ULong = 8,
|
|
NInt = 9,
|
|
NUInt = 0xA,
|
|
Char = 0xB,
|
|
Float = 0xC,
|
|
Double = 0xD,
|
|
Decimal = 0xE,
|
|
Bool = 0xF,
|
|
Object = 0x10,
|
|
String = 0x11,
|
|
StringAndObject = 0x12,
|
|
ObjectAndString = 0x13,
|
|
Enum = 0x14,
|
|
EnumAndUnderlying = 0x15,
|
|
UnderlyingAndEnum = 0x16,
|
|
Delegate = 0x17,
|
|
Pointer = 0x18,
|
|
PointerAndInt = 0x19,
|
|
PointerAndUInt = 0x20,
|
|
PointerAndLong = 0x21,
|
|
PointerAndULong = 0x22,
|
|
IntAndPointer = 0x23,
|
|
UIntAndPointer = 0x24,
|
|
LongAndPointer = 0x25,
|
|
ULongAndPointer = 0x26,
|
|
NullableNull = 0x27,
|
|
UserDefined = 0x28,
|
|
Dynamic = 0x29,
|
|
Utf8 = 0x2A,
|
|
OpMask = 0xFF00,
|
|
Multiplication = 0x1000,
|
|
Addition = 0x1100,
|
|
Subtraction = 0x1200,
|
|
Division = 0x1300,
|
|
Remainder = 0x1400,
|
|
LeftShift = 0x1500,
|
|
RightShift = 0x1600,
|
|
Equal = 0x1700,
|
|
NotEqual = 0x1800,
|
|
GreaterThan = 0x1900,
|
|
LessThan = 0x1A00,
|
|
GreaterThanOrEqual = 0x1B00,
|
|
LessThanOrEqual = 0x1C00,
|
|
And = 0x1D00,
|
|
Xor = 0x1E00,
|
|
Or = 0x1F00,
|
|
UnsignedRightShift = 0x2000,
|
|
Lifted = 0x10000,
|
|
Logical = 0x20000,
|
|
Checked = 0x40000,
|
|
Error = 0,
|
|
IntMultiplication = 0x1005,
|
|
UIntMultiplication = 0x1006,
|
|
LongMultiplication = 0x1007,
|
|
ULongMultiplication = 0x1008,
|
|
NIntMultiplication = 0x1009,
|
|
NUIntMultiplication = 0x100A,
|
|
FloatMultiplication = 0x100C,
|
|
DoubleMultiplication = 0x100D,
|
|
DecimalMultiplication = 0x100E,
|
|
UserDefinedMultiplication = 0x1028,
|
|
LiftedIntMultiplication = 0x11005,
|
|
LiftedUIntMultiplication = 0x11006,
|
|
LiftedLongMultiplication = 0x11007,
|
|
LiftedULongMultiplication = 0x11008,
|
|
LiftedNIntMultiplication = 0x11009,
|
|
LiftedNUIntMultiplication = 0x1100A,
|
|
LiftedFloatMultiplication = 0x1100C,
|
|
LiftedDoubleMultiplication = 0x1100D,
|
|
LiftedDecimalMultiplication = 0x1100E,
|
|
LiftedUserDefinedMultiplication = 0x11028,
|
|
DynamicMultiplication = 0x1029,
|
|
IntDivision = 0x1305,
|
|
UIntDivision = 0x1306,
|
|
LongDivision = 0x1307,
|
|
ULongDivision = 0x1308,
|
|
NIntDivision = 0x1309,
|
|
NUIntDivision = 0x130A,
|
|
FloatDivision = 0x130C,
|
|
DoubleDivision = 0x130D,
|
|
DecimalDivision = 0x130E,
|
|
UserDefinedDivision = 0x1328,
|
|
LiftedIntDivision = 0x11305,
|
|
LiftedUIntDivision = 0x11306,
|
|
LiftedLongDivision = 0x11307,
|
|
LiftedULongDivision = 0x11308,
|
|
LiftedNIntDivision = 0x11309,
|
|
LiftedNUIntDivision = 0x1130A,
|
|
LiftedFloatDivision = 0x1130C,
|
|
LiftedDoubleDivision = 0x1130D,
|
|
LiftedDecimalDivision = 0x1130E,
|
|
LiftedUserDefinedDivision = 0x11328,
|
|
DynamicDivision = 0x1329,
|
|
IntRemainder = 0x1405,
|
|
UIntRemainder = 0x1406,
|
|
LongRemainder = 0x1407,
|
|
ULongRemainder = 0x1408,
|
|
NIntRemainder = 0x1409,
|
|
NUIntRemainder = 0x140A,
|
|
FloatRemainder = 0x140C,
|
|
DoubleRemainder = 0x140D,
|
|
DecimalRemainder = 0x140E,
|
|
UserDefinedRemainder = 0x1428,
|
|
LiftedIntRemainder = 0x11405,
|
|
LiftedUIntRemainder = 0x11406,
|
|
LiftedLongRemainder = 0x11407,
|
|
LiftedULongRemainder = 0x11408,
|
|
LiftedNIntRemainder = 0x11409,
|
|
LiftedNUIntRemainder = 0x1140A,
|
|
LiftedFloatRemainder = 0x1140C,
|
|
LiftedDoubleRemainder = 0x1140D,
|
|
LiftedDecimalRemainder = 0x1140E,
|
|
LiftedUserDefinedRemainder = 0x11428,
|
|
DynamicRemainder = 0x1429,
|
|
IntAddition = 0x1105,
|
|
UIntAddition = 0x1106,
|
|
LongAddition = 0x1107,
|
|
ULongAddition = 0x1108,
|
|
NIntAddition = 0x1109,
|
|
NUIntAddition = 0x110A,
|
|
FloatAddition = 0x110C,
|
|
DoubleAddition = 0x110D,
|
|
DecimalAddition = 0x110E,
|
|
EnumAndUnderlyingAddition = 0x1115,
|
|
UnderlyingAndEnumAddition = 0x1116,
|
|
UserDefinedAddition = 0x1128,
|
|
LiftedIntAddition = 0x11105,
|
|
LiftedUIntAddition = 0x11106,
|
|
LiftedLongAddition = 0x11107,
|
|
LiftedULongAddition = 0x11108,
|
|
LiftedNIntAddition = 0x11109,
|
|
LiftedNUIntAddition = 0x1110A,
|
|
LiftedFloatAddition = 0x1110C,
|
|
LiftedDoubleAddition = 0x1110D,
|
|
LiftedDecimalAddition = 0x1110E,
|
|
LiftedEnumAndUnderlyingAddition = 0x11115,
|
|
LiftedUnderlyingAndEnumAddition = 0x11116,
|
|
LiftedUserDefinedAddition = 0x11128,
|
|
PointerAndIntAddition = 0x1119,
|
|
PointerAndUIntAddition = 0x1120,
|
|
PointerAndLongAddition = 0x1121,
|
|
PointerAndULongAddition = 0x1122,
|
|
IntAndPointerAddition = 0x1123,
|
|
UIntAndPointerAddition = 0x1124,
|
|
LongAndPointerAddition = 0x1125,
|
|
ULongAndPointerAddition = 0x1126,
|
|
StringConcatenation = 0x1111,
|
|
StringAndObjectConcatenation = 0x1112,
|
|
ObjectAndStringConcatenation = 0x1113,
|
|
DelegateCombination = 0x1117,
|
|
DynamicAddition = 0x1129,
|
|
Utf8Addition = 0x112A,
|
|
IntSubtraction = 0x1205,
|
|
UIntSubtraction = 0x1206,
|
|
LongSubtraction = 0x1207,
|
|
ULongSubtraction = 0x1208,
|
|
NIntSubtraction = 0x1209,
|
|
NUIntSubtraction = 0x120A,
|
|
FloatSubtraction = 0x120C,
|
|
DoubleSubtraction = 0x120D,
|
|
DecimalSubtraction = 0x120E,
|
|
EnumSubtraction = 0x1214,
|
|
EnumAndUnderlyingSubtraction = 0x1215,
|
|
UnderlyingAndEnumSubtraction = 0x1216,
|
|
UserDefinedSubtraction = 0x1228,
|
|
LiftedIntSubtraction = 0x11205,
|
|
LiftedUIntSubtraction = 0x11206,
|
|
LiftedLongSubtraction = 0x11207,
|
|
LiftedULongSubtraction = 0x11208,
|
|
LiftedNIntSubtraction = 0x11209,
|
|
LiftedNUIntSubtraction = 0x1120A,
|
|
LiftedFloatSubtraction = 0x1120C,
|
|
LiftedDoubleSubtraction = 0x1120D,
|
|
LiftedDecimalSubtraction = 0x1120E,
|
|
LiftedEnumSubtraction = 0x11214,
|
|
LiftedEnumAndUnderlyingSubtraction = 0x11215,
|
|
LiftedUnderlyingAndEnumSubtraction = 0x11216,
|
|
LiftedUserDefinedSubtraction = 0x11228,
|
|
DelegateRemoval = 0x1217,
|
|
PointerAndIntSubtraction = 0x1219,
|
|
PointerAndUIntSubtraction = 0x1220,
|
|
PointerAndLongSubtraction = 0x1221,
|
|
PointerAndULongSubtraction = 0x1222,
|
|
PointerSubtraction = 0x1218,
|
|
DynamicSubtraction = 0x1229,
|
|
IntLeftShift = 0x1505,
|
|
UIntLeftShift = 0x1506,
|
|
LongLeftShift = 0x1507,
|
|
ULongLeftShift = 0x1508,
|
|
NIntLeftShift = 0x1509,
|
|
NUIntLeftShift = 0x150A,
|
|
UserDefinedLeftShift = 0x1528,
|
|
LiftedIntLeftShift = 0x11505,
|
|
LiftedUIntLeftShift = 0x11506,
|
|
LiftedLongLeftShift = 0x11507,
|
|
LiftedULongLeftShift = 0x11508,
|
|
LiftedNIntLeftShift = 0x11509,
|
|
LiftedNUIntLeftShift = 0x1150A,
|
|
LiftedUserDefinedLeftShift = 0x11528,
|
|
DynamicLeftShift = 0x1529,
|
|
IntRightShift = 0x1605,
|
|
UIntRightShift = 0x1606,
|
|
LongRightShift = 0x1607,
|
|
ULongRightShift = 0x1608,
|
|
NIntRightShift = 0x1609,
|
|
NUIntRightShift = 0x160A,
|
|
UserDefinedRightShift = 0x1628,
|
|
LiftedIntRightShift = 0x11605,
|
|
LiftedUIntRightShift = 0x11606,
|
|
LiftedLongRightShift = 0x11607,
|
|
LiftedULongRightShift = 0x11608,
|
|
LiftedNIntRightShift = 0x11609,
|
|
LiftedNUIntRightShift = 0x1160A,
|
|
LiftedUserDefinedRightShift = 0x11628,
|
|
DynamicRightShift = 0x1629,
|
|
IntUnsignedRightShift = 0x2005,
|
|
UIntUnsignedRightShift = 0x2006,
|
|
LongUnsignedRightShift = 0x2007,
|
|
ULongUnsignedRightShift = 0x2008,
|
|
NIntUnsignedRightShift = 0x2009,
|
|
NUIntUnsignedRightShift = 0x200A,
|
|
UserDefinedUnsignedRightShift = 0x2028,
|
|
LiftedIntUnsignedRightShift = 0x12005,
|
|
LiftedUIntUnsignedRightShift = 0x12006,
|
|
LiftedLongUnsignedRightShift = 0x12007,
|
|
LiftedULongUnsignedRightShift = 0x12008,
|
|
LiftedNIntUnsignedRightShift = 0x12009,
|
|
LiftedNUIntUnsignedRightShift = 0x1200A,
|
|
LiftedUserDefinedUnsignedRightShift = 0x12028,
|
|
IntEqual = 0x1705,
|
|
UIntEqual = 0x1706,
|
|
LongEqual = 0x1707,
|
|
ULongEqual = 0x1708,
|
|
NIntEqual = 0x1709,
|
|
NUIntEqual = 0x170A,
|
|
FloatEqual = 0x170C,
|
|
DoubleEqual = 0x170D,
|
|
DecimalEqual = 0x170E,
|
|
BoolEqual = 0x170F,
|
|
EnumEqual = 0x1714,
|
|
NullableNullEqual = 0x1727,
|
|
UserDefinedEqual = 0x1728,
|
|
LiftedIntEqual = 0x11705,
|
|
LiftedUIntEqual = 0x11706,
|
|
LiftedLongEqual = 0x11707,
|
|
LiftedULongEqual = 0x11708,
|
|
LiftedNIntEqual = 0x11709,
|
|
LiftedNUIntEqual = 0x1170A,
|
|
LiftedFloatEqual = 0x1170C,
|
|
LiftedDoubleEqual = 0x1170D,
|
|
LiftedDecimalEqual = 0x1170E,
|
|
LiftedBoolEqual = 0x1170F,
|
|
LiftedEnumEqual = 0x11714,
|
|
LiftedUserDefinedEqual = 0x11728,
|
|
ObjectEqual = 0x1710,
|
|
StringEqual = 0x1711,
|
|
DelegateEqual = 0x1717,
|
|
PointerEqual = 0x1718,
|
|
DynamicEqual = 0x1729,
|
|
IntNotEqual = 0x1805,
|
|
UIntNotEqual = 0x1806,
|
|
LongNotEqual = 0x1807,
|
|
ULongNotEqual = 0x1808,
|
|
NIntNotEqual = 0x1809,
|
|
NUIntNotEqual = 0x180A,
|
|
FloatNotEqual = 0x180C,
|
|
DoubleNotEqual = 0x180D,
|
|
DecimalNotEqual = 0x180E,
|
|
BoolNotEqual = 0x180F,
|
|
EnumNotEqual = 0x1814,
|
|
NullableNullNotEqual = 0x1827,
|
|
UserDefinedNotEqual = 0x1828,
|
|
LiftedIntNotEqual = 0x11805,
|
|
LiftedUIntNotEqual = 0x11806,
|
|
LiftedLongNotEqual = 0x11807,
|
|
LiftedULongNotEqual = 0x11808,
|
|
LiftedNIntNotEqual = 0x11809,
|
|
LiftedNUIntNotEqual = 0x1180A,
|
|
LiftedFloatNotEqual = 0x1180C,
|
|
LiftedDoubleNotEqual = 0x1180D,
|
|
LiftedDecimalNotEqual = 0x1180E,
|
|
LiftedBoolNotEqual = 0x1180F,
|
|
LiftedEnumNotEqual = 0x11814,
|
|
LiftedUserDefinedNotEqual = 0x11828,
|
|
ObjectNotEqual = 0x1810,
|
|
StringNotEqual = 0x1811,
|
|
DelegateNotEqual = 0x1817,
|
|
PointerNotEqual = 0x1818,
|
|
DynamicNotEqual = 0x1829,
|
|
IntLessThan = 0x1A05,
|
|
UIntLessThan = 0x1A06,
|
|
LongLessThan = 0x1A07,
|
|
ULongLessThan = 0x1A08,
|
|
NIntLessThan = 0x1A09,
|
|
NUIntLessThan = 0x1A0A,
|
|
FloatLessThan = 0x1A0C,
|
|
DoubleLessThan = 0x1A0D,
|
|
DecimalLessThan = 0x1A0E,
|
|
EnumLessThan = 0x1A14,
|
|
UserDefinedLessThan = 0x1A28,
|
|
LiftedIntLessThan = 0x11A05,
|
|
LiftedUIntLessThan = 0x11A06,
|
|
LiftedLongLessThan = 0x11A07,
|
|
LiftedULongLessThan = 0x11A08,
|
|
LiftedNIntLessThan = 0x11A09,
|
|
LiftedNUIntLessThan = 0x11A0A,
|
|
LiftedFloatLessThan = 0x11A0C,
|
|
LiftedDoubleLessThan = 0x11A0D,
|
|
LiftedDecimalLessThan = 0x11A0E,
|
|
LiftedEnumLessThan = 0x11A14,
|
|
LiftedUserDefinedLessThan = 0x11A28,
|
|
PointerLessThan = 0x1A18,
|
|
DynamicLessThan = 0x1A29,
|
|
IntGreaterThan = 0x1905,
|
|
UIntGreaterThan = 0x1906,
|
|
LongGreaterThan = 0x1907,
|
|
ULongGreaterThan = 0x1908,
|
|
NIntGreaterThan = 0x1909,
|
|
NUIntGreaterThan = 0x190A,
|
|
FloatGreaterThan = 0x190C,
|
|
DoubleGreaterThan = 0x190D,
|
|
DecimalGreaterThan = 0x190E,
|
|
EnumGreaterThan = 0x1914,
|
|
UserDefinedGreaterThan = 0x1928,
|
|
LiftedIntGreaterThan = 0x11905,
|
|
LiftedUIntGreaterThan = 0x11906,
|
|
LiftedLongGreaterThan = 0x11907,
|
|
LiftedULongGreaterThan = 0x11908,
|
|
LiftedNIntGreaterThan = 0x11909,
|
|
LiftedNUIntGreaterThan = 0x1190A,
|
|
LiftedFloatGreaterThan = 0x1190C,
|
|
LiftedDoubleGreaterThan = 0x1190D,
|
|
LiftedDecimalGreaterThan = 0x1190E,
|
|
LiftedEnumGreaterThan = 0x11914,
|
|
LiftedUserDefinedGreaterThan = 0x11928,
|
|
PointerGreaterThan = 0x1918,
|
|
DynamicGreaterThan = 0x1929,
|
|
IntLessThanOrEqual = 0x1C05,
|
|
UIntLessThanOrEqual = 0x1C06,
|
|
LongLessThanOrEqual = 0x1C07,
|
|
ULongLessThanOrEqual = 0x1C08,
|
|
NIntLessThanOrEqual = 0x1C09,
|
|
NUIntLessThanOrEqual = 0x1C0A,
|
|
FloatLessThanOrEqual = 0x1C0C,
|
|
DoubleLessThanOrEqual = 0x1C0D,
|
|
DecimalLessThanOrEqual = 0x1C0E,
|
|
EnumLessThanOrEqual = 0x1C14,
|
|
UserDefinedLessThanOrEqual = 0x1C28,
|
|
LiftedIntLessThanOrEqual = 0x11C05,
|
|
LiftedUIntLessThanOrEqual = 0x11C06,
|
|
LiftedLongLessThanOrEqual = 0x11C07,
|
|
LiftedULongLessThanOrEqual = 0x11C08,
|
|
LiftedNIntLessThanOrEqual = 0x11C09,
|
|
LiftedNUIntLessThanOrEqual = 0x11C0A,
|
|
LiftedFloatLessThanOrEqual = 0x11C0C,
|
|
LiftedDoubleLessThanOrEqual = 0x11C0D,
|
|
LiftedDecimalLessThanOrEqual = 0x11C0E,
|
|
LiftedEnumLessThanOrEqual = 0x11C14,
|
|
LiftedUserDefinedLessThanOrEqual = 0x11C28,
|
|
PointerLessThanOrEqual = 0x1C18,
|
|
DynamicLessThanOrEqual = 0x1C29,
|
|
IntGreaterThanOrEqual = 0x1B05,
|
|
UIntGreaterThanOrEqual = 0x1B06,
|
|
LongGreaterThanOrEqual = 0x1B07,
|
|
ULongGreaterThanOrEqual = 0x1B08,
|
|
NIntGreaterThanOrEqual = 0x1B09,
|
|
NUIntGreaterThanOrEqual = 0x1B0A,
|
|
FloatGreaterThanOrEqual = 0x1B0C,
|
|
DoubleGreaterThanOrEqual = 0x1B0D,
|
|
DecimalGreaterThanOrEqual = 0x1B0E,
|
|
EnumGreaterThanOrEqual = 0x1B14,
|
|
UserDefinedGreaterThanOrEqual = 0x1B28,
|
|
LiftedIntGreaterThanOrEqual = 0x11B05,
|
|
LiftedUIntGreaterThanOrEqual = 0x11B06,
|
|
LiftedLongGreaterThanOrEqual = 0x11B07,
|
|
LiftedULongGreaterThanOrEqual = 0x11B08,
|
|
LiftedNIntGreaterThanOrEqual = 0x11B09,
|
|
LiftedNUIntGreaterThanOrEqual = 0x11B0A,
|
|
LiftedFloatGreaterThanOrEqual = 0x11B0C,
|
|
LiftedDoubleGreaterThanOrEqual = 0x11B0D,
|
|
LiftedDecimalGreaterThanOrEqual = 0x11B0E,
|
|
LiftedEnumGreaterThanOrEqual = 0x11B14,
|
|
LiftedUserDefinedGreaterThanOrEqual = 0x11B28,
|
|
PointerGreaterThanOrEqual = 0x1B18,
|
|
DynamicGreaterThanOrEqual = 0x1B29,
|
|
IntAnd = 0x1D05,
|
|
UIntAnd = 0x1D06,
|
|
LongAnd = 0x1D07,
|
|
ULongAnd = 0x1D08,
|
|
NIntAnd = 0x1D09,
|
|
NUIntAnd = 0x1D0A,
|
|
EnumAnd = 0x1D14,
|
|
BoolAnd = 0x1D0F,
|
|
UserDefinedAnd = 0x1D28,
|
|
LiftedIntAnd = 0x11D05,
|
|
LiftedUIntAnd = 0x11D06,
|
|
LiftedLongAnd = 0x11D07,
|
|
LiftedULongAnd = 0x11D08,
|
|
LiftedNIntAnd = 0x11D09,
|
|
LiftedNUIntAnd = 0x11D0A,
|
|
LiftedEnumAnd = 0x11D14,
|
|
LiftedBoolAnd = 0x11D0F,
|
|
LiftedUserDefinedAnd = 0x11D28,
|
|
DynamicAnd = 0x1D29,
|
|
LogicalAnd = 0x21D00,
|
|
LogicalBoolAnd = 0x21D0F,
|
|
LogicalUserDefinedAnd = 0x21D28,
|
|
DynamicLogicalAnd = 0x21D29,
|
|
IntOr = 0x1F05,
|
|
UIntOr = 0x1F06,
|
|
LongOr = 0x1F07,
|
|
ULongOr = 0x1F08,
|
|
NIntOr = 0x1F09,
|
|
NUIntOr = 0x1F0A,
|
|
EnumOr = 0x1F14,
|
|
BoolOr = 0x1F0F,
|
|
UserDefinedOr = 0x1F28,
|
|
LiftedIntOr = 0x11F05,
|
|
LiftedUIntOr = 0x11F06,
|
|
LiftedLongOr = 0x11F07,
|
|
LiftedULongOr = 0x11F08,
|
|
LiftedNIntOr = 0x11F09,
|
|
LiftedNUIntOr = 0x11F0A,
|
|
LiftedEnumOr = 0x11F14,
|
|
LiftedBoolOr = 0x11F0F,
|
|
LiftedUserDefinedOr = 0x11F28,
|
|
DynamicOr = 0x1F29,
|
|
LogicalOr = 0x21F00,
|
|
LogicalBoolOr = 0x21F0F,
|
|
LogicalUserDefinedOr = 0x21F28,
|
|
DynamicLogicalOr = 0x21F29,
|
|
IntXor = 0x1E05,
|
|
UIntXor = 0x1E06,
|
|
LongXor = 0x1E07,
|
|
ULongXor = 0x1E08,
|
|
NIntXor = 0x1E09,
|
|
NUIntXor = 0x1E0A,
|
|
EnumXor = 0x1E14,
|
|
BoolXor = 0x1E0F,
|
|
UserDefinedXor = 0x1E28,
|
|
LiftedIntXor = 0x11E05,
|
|
LiftedUIntXor = 0x11E06,
|
|
LiftedLongXor = 0x11E07,
|
|
LiftedULongXor = 0x11E08,
|
|
LiftedNIntXor = 0x11E09,
|
|
LiftedNUIntXor = 0x11E0A,
|
|
LiftedEnumXor = 0x11E14,
|
|
LiftedBoolXor = 0x11E0F,
|
|
LiftedUserDefinedXor = 0x11E28,
|
|
DynamicXor = 0x1E29
|
|
}
|