junichi11 commented on a change in pull request #2674:
URL: https://github.com/apache/netbeans/pull/2674#discussion_r556165037



##########
File path: php/php.editor/tools/ASTPHP5Parser.cup
##########
@@ -2328,56 +2329,73 @@ attributes:attributes parameter:param
 :}
 ;
 
-parameter ::=
-optional_class_type_without_static:classType is_variadic:isVariadic 
T_VARIABLE:var
-{:
-    int start = classType == null ? (isVariadic ? isVariadicleft : varleft) : 
classTypeleft;
-    Variable v = new Variable(varleft, varright, var);
-        Expression argument = v;
-        if (isVariadic) {
-            argument = new Variadic(isVariadicleft, varright, v);
-        }
-    FormalParameter parameter = new FormalParameter(start, varright, 
classType, argument);
-    RESULT = parameter;
-:}
-
-| optional_class_type_without_static:classType T_REFERENCE:ref T_VARIABLE:var
+optional_visibility_modifier ::=
+constant_modifiers:modifier
 {:
-    int start = classType == null ? refleft : classTypeleft;
-    Variable v = new Variable(varleft, varright, var);
-    Reference ref_var = new Reference (refleft, varright, v);
-    FormalParameter parameter = new FormalParameter(start, varright, 
classType, ref_var);
-    RESULT = parameter;
-:}
-
-| optional_class_type_without_static:classType T_REFERENCE:ref T_ELLIPSIS:ell 
T_VARIABLE:var
-{:
-    int start = classType == null ? refleft : classTypeleft;
-    Variable v = new Variable(varleft, varright, var);
-    Variadic variadic = new Variadic(ellleft, varright, v);
-    Reference ref_var = new Reference (refleft, varright, variadic);
-    FormalParameter parameter = new FormalParameter(start, varright, 
classType, ref_var);
-    RESULT = parameter;
+    RESULT = modifier;
 :}
+;
 
-| optional_class_type_without_static:classType is_variadic:isVariadic 
T_VARIABLE:var T_EQUAL static_scalar:scalar
+parameter ::=
+optional_visibility_modifier:modifier 
optional_class_type_without_static:classType is_reference:isReference 
is_variadic:isVariadic T_VARIABLE:var

Review comment:
       Combined a few cases into one.




----------------------------------------------------------------
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

Reply via email to