diff --git a/plugins/org.eclipse.php.core/Resources/parserTools/parser/php81/php_ast_parser.cup b/plugins/org.eclipse.php.core/Resources/parserTools/parser/php81/php_ast_parser.cup index add0b59b9f..5ae25eef7e 100644 --- a/plugins/org.eclipse.php.core/Resources/parserTools/parser/php81/php_ast_parser.cup +++ b/plugins/org.eclipse.php.core/Resources/parserTools/parser/php81/php_ast_parser.cup @@ -3019,6 +3019,11 @@ T_LIST:s T_OPEN_PARENTHESE assignment_list:varList T_CLOSE_PARENTHESE:close T_EQ RESULT = new InfixExpression(expr1left, expr2right, parser.ast, expr1, InfixExpression.OP_AND, expr2); :} +| expr:expr1 T_REFERENCE_FOLLOWED_BY_VAR_OR_VARARG expr:expr2 +{: + RESULT = new InfixExpression(expr1left, expr2right, parser.ast, expr1, InfixExpression.OP_AND, expr2); +:} + | expr:expr1 T_KOVA expr:expr2 {: RESULT = new InfixExpression(expr1left, expr2right, parser.ast, expr1, InfixExpression.OP_XOR, expr2); diff --git a/plugins/org.eclipse.php.core/Resources/parserTools/parser/php82/php_ast_parser.cup b/plugins/org.eclipse.php.core/Resources/parserTools/parser/php82/php_ast_parser.cup index 0e6e622fe8..146a3c3942 100644 --- a/plugins/org.eclipse.php.core/Resources/parserTools/parser/php82/php_ast_parser.cup +++ b/plugins/org.eclipse.php.core/Resources/parserTools/parser/php82/php_ast_parser.cup @@ -3073,6 +3073,11 @@ T_LIST:s T_OPEN_PARENTHESE assignment_list:varList T_CLOSE_PARENTHESE:close T_EQ RESULT = new InfixExpression(expr1left, expr2right, parser.ast, expr1, InfixExpression.OP_AND, expr2); :} +| expr:expr1 T_REFERENCE_FOLLOWED_BY_VAR_OR_VARARG expr:expr2 +{: + RESULT = new InfixExpression(expr1left, expr2right, parser.ast, expr1, InfixExpression.OP_AND, expr2); +:} + | expr:expr1 T_KOVA expr:expr2 {: RESULT = new InfixExpression(expr1left, expr2right, parser.ast, expr1, InfixExpression.OP_XOR, expr2); diff --git a/plugins/org.eclipse.php.core/Resources/parserTools/parser/php83/php_ast_parser.cup b/plugins/org.eclipse.php.core/Resources/parserTools/parser/php83/php_ast_parser.cup index 1e513d439a..5e4bbf2380 100644 --- a/plugins/org.eclipse.php.core/Resources/parserTools/parser/php83/php_ast_parser.cup +++ b/plugins/org.eclipse.php.core/Resources/parserTools/parser/php83/php_ast_parser.cup @@ -3099,6 +3099,11 @@ T_LIST:s T_OPEN_PARENTHESE assignment_list:varList T_CLOSE_PARENTHESE:close T_EQ RESULT = new InfixExpression(expr1left, expr2right, parser.ast, expr1, InfixExpression.OP_AND, expr2); :} +| expr:expr1 T_REFERENCE_FOLLOWED_BY_VAR_OR_VARARG expr:expr2 +{: + RESULT = new InfixExpression(expr1left, expr2right, parser.ast, expr1, InfixExpression.OP_AND, expr2); +:} + | expr:expr1 T_KOVA expr:expr2 {: RESULT = new InfixExpression(expr1left, expr2right, parser.ast, expr1, InfixExpression.OP_XOR, expr2); diff --git a/tests/org.eclipse.php.core.tests/workspace/dom_parser/php81/testReference.pdtt b/tests/org.eclipse.php.core.tests/workspace/dom_parser/php81/testReference.pdtt new file mode 100644 index 0000000000..b71e2fe9a4 --- /dev/null +++ b/tests/org.eclipse.php.core.tests/workspace/dom_parser/php81/testReference.pdtt @@ -0,0 +1,24 @@ +--TEST-- +PHP 8.1 +--FILE-- + +--EXPECT-- + + + + + + + + + + + + + + + + +