Skip to content

Commit d930d82

Browse files
committed
Revert "Fix For ENBF"
This reverts commit b32eda6.
1 parent b32eda6 commit d930d82

File tree

1 file changed

+8
-15
lines changed

1 file changed

+8
-15
lines changed

src/Query/Parser.php

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2468,21 +2468,13 @@ public function ConditionalPrimary(): AST\ConditionalPrimary
24682468
return $condPrimary;
24692469
}
24702470

2471-
/**
2472-
* SimpleConditionalExpression ::=
2473-
* ComparisonExpression | BetweenExpression | LikeExpression |
2474-
* InExpression | NullComparisonExpression | ExistsExpression |
2475-
* EmptyCollectionComparisonExpression | CollectionMemberExpression |
2476-
* InstanceOfExpression
2477-
*
2478-
* InExpression ::= ArithmeticExpression ["NOT"] "IN" "(" (InParameter {"," InParameter}* | Subselect) ")"
2479-
*
2480-
* Note: ArithmeticExpression includes CaseExpression (CASE/COALESCE/NULLIF) and
2481-
* parenthesized expressions, allowing constructs like:
2482-
* - CASE WHEN ... END IN (...)
2483-
* - COALESCE(...) IN (...)
2484-
* - (u.id + 1) IN (...)
2485-
*/
2471+
/**
2472+
* SimpleConditionalExpression ::=
2473+
* ComparisonExpression | BetweenExpression | LikeExpression |
2474+
* InExpression | NullComparisonExpression | ExistsExpression |
2475+
* EmptyCollectionComparisonExpression | CollectionMemberExpression |
2476+
* InstanceOfExpression
2477+
*/
24862478
public function SimpleConditionalExpression(): AST\ExistsExpression|AST\BetweenExpression|AST\LikeExpression|AST\InListExpression|AST\InSubselectExpression|AST\InstanceOfExpression|AST\CollectionMemberExpression|AST\NullComparisonExpression|AST\EmptyCollectionComparisonExpression|AST\ComparisonExpression
24872479
{
24882480
assert($this->lexer->lookahead !== null);
@@ -2504,6 +2496,7 @@ public function SimpleConditionalExpression(): AST\ExistsExpression|AST\BetweenE
25042496
// Handle conditional and null-handling expressions (CASE, COALESCE, NULLIF) by peeking ahead in the token stream
25052497
if ($token->type === TokenType::T_CASE || $token->type === TokenType::T_COALESCE || $token->type === TokenType::T_NULLIF) {
25062498
if ($token->type === TokenType::T_CASE) {
2499+
25072500
// For CASE expressions, peek beyond the matching END keyword
25082501
$nestingDepth = 1;
25092502

0 commit comments

Comments
 (0)