C#: Add unsigned right shift operator class.

This commit is contained in:
Michael Nebel
2023-01-09 15:47:32 +01:00
parent 148dc6de5a
commit 30738103f0

View File

@@ -637,7 +637,8 @@ class TrueOperator extends UnaryOperator {
* operator (`DivOperator`), a remainder operator (`RemOperator`), an and
* operator (`AndOperator`), an or operator (`OrOperator`), an xor
* operator (`XorOperator`), a left shift operator (`LeftShiftOperator`),
* a right shift operator (`RightShiftOperator`), an equals operator (`EQOperator`),
* a right shift operator (`RightShiftOperator`), an unsigned right shift
* operator(`UnsignedRightShiftOperator`), an equals operator (`EQOperator`),
* a not equals operator (`NEOperator`), a lesser than operator (`LTOperator`),
* a greater than operator (`GTOperator`), a less than or equals operator
* (`LEOperator`), or a greater than or equals operator (`GEOperator`).
@@ -822,6 +823,23 @@ class RightShiftOperator extends BinaryOperator {
/** DEPRECATED: Alias for RightShiftOperator. */
deprecated class RShiftOperator = RightShiftOperator;
/**
* A user-defined unsigned right shift operator (`>>>`), for example
*
* ```csharp
* public static Widget operator >>>(Widget lhs, Widget rhs) {
* ...
* }
* ```
*/
class UnsignedRightShiftOperator extends BinaryOperator {
UnsignedRightShiftOperator() { this.getName() = ">>>" }
override string getFunctionName() { result = "op_UnsignedRightShift" }
override string getAPrimaryQlClass() { result = "UnsignedRightShiftOperator" }
}
/**
* A user-defined equals operator (`==`), for example
*