|
@@ 655-665 (lines=11) @@
|
| 652 |
|
public static function validateUnaryOpArguments($expressionToken, $argExpression) |
| 653 |
|
{ |
| 654 |
|
//Unary not |
| 655 |
|
if (strcmp($expressionToken->Text, ODataConstants::KEYWORD_NOT) == 0) { |
| 656 |
|
$function = self::findFunctionWithPromotion( |
| 657 |
|
self::notOperationFunctions(), |
| 658 |
|
array($argExpression) |
| 659 |
|
); |
| 660 |
|
if ($function == null) { |
| 661 |
|
self::incompatibleError($expressionToken, array($argExpression)); |
| 662 |
|
} |
| 663 |
|
|
| 664 |
|
return; |
| 665 |
|
} |
| 666 |
|
|
| 667 |
|
//Unary minus (negation) |
| 668 |
|
if (strcmp($expressionToken->Text, '-') == 0) { |
|
@@ 668-672 (lines=5) @@
|
| 665 |
|
} |
| 666 |
|
|
| 667 |
|
//Unary minus (negation) |
| 668 |
|
if (strcmp($expressionToken->Text, '-') == 0) { |
| 669 |
|
if (self::findFunctionWithPromotion(self::negateOperationFunctions(), array($argExpression)) == null) { |
| 670 |
|
self::incompatibleError($expressionToken, array($argExpression)); |
| 671 |
|
} |
| 672 |
|
} |
| 673 |
|
} |
| 674 |
|
|
| 675 |
|
/** |