5
5
private import codeql.rust.elements.BinaryExpr
6
6
private import codeql.rust.elements.PrefixExpr
7
7
private import codeql.rust.elements.Operation
8
+ private import codeql.rust.elements.AssignmentOperation
8
9
9
10
/**
10
11
* An arithmetic operation, such as `+`, `*=`, or `-`.
@@ -17,25 +18,21 @@ final class ArithmeticOperation = ArithmeticOperationImpl;
17
18
* A binary arithmetic operation, such as `+` or `*`.
18
19
*/
19
20
final class BinaryArithmeticOperation extends BinaryExpr , ArithmeticOperationImpl {
20
- BinaryArithmeticOperation ( ) {
21
- this .getOperatorName ( ) = [ "+" , "-" , "*" , "/" , "%" ]
22
- }
21
+ BinaryArithmeticOperation ( ) { this .getOperatorName ( ) = [ "+" , "-" , "*" , "/" , "%" ] }
23
22
}
24
23
25
24
/**
26
25
* An arithmetic assignment operation, such as `+=` or `*=`.
27
26
*/
28
- final class AssignArithmeticOperation extends BinaryExpr , ArithmeticOperationImpl {
29
- AssignArithmeticOperation ( ) {
30
- this . getOperatorName ( ) = [ "+=" , "-=" , "*=" , "/=" , "%=" ]
31
- }
27
+ final class AssignArithmeticOperation extends BinaryExpr , ArithmeticOperationImpl ,
28
+ AssignmentOperation
29
+ {
30
+ AssignArithmeticOperation ( ) { this . getOperatorName ( ) = [ "+=" , "-=" , "*=" , "/=" , "%=" ] }
32
31
}
33
32
34
33
/**
35
34
* A prefix arithmetic operation, such as `-`.
36
35
*/
37
36
final class PrefixArithmeticOperation extends PrefixExpr , ArithmeticOperationImpl {
38
- PrefixArithmeticOperation ( ) {
39
- this .getOperatorName ( ) = "-"
40
- }
37
+ PrefixArithmeticOperation ( ) { this .getOperatorName ( ) = "-" }
41
38
}
0 commit comments