junichi11 commented on a change in pull request #2640:
URL: https://github.com/apache/netbeans/pull/2640#discussion_r551650262
##########
File path: php/php.editor/tools/ASTPHP5Parser.cup
##########
@@ -2419,6 +2547,13 @@ is_variadic:isVariadic expr_without_variable:var
RESULT = paramsList;
:}
+| error:expr
+{:
+ List paramsList = new LinkedList();
+ paramsList.add(new ASTErrorExpression(exprleft, exprright));
+ RESULT = paramsList;
+:}
+
Review comment:
To avoid `ASTError`, add `ASTErrorExpression`.
e.g.
If we don't add `ASTErrorExpression`, the following (whole statement)is
recognized as `ASTError`. In such case, some features(e.g. formatting, CC) may
not work correctly. Plus, we have to sanitize the code and parse it again.
```
#[A(1, self::)]
class Test {}
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists