rfc:trailing-comma-function-args

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
rfc:trailing-comma-function-args [2013/02/21 03:02] tyraelrfc:trailing-comma-function-args [2017/09/22 13:28] (current) – external edit 127.0.0.1
Line 3: Line 3:
   * Date: 2013-02-19   * Date: 2013-02-19
   * Author: Sara Golemon <pollita@php.net>   * Author: Sara Golemon <pollita@php.net>
-  * Status: Under Discussion+  * Status: Rejected
   * First Published at: http://wiki.php.net/rfc/trailing-comma-function-args   * First Published at: http://wiki.php.net/rfc/trailing-comma-function-args
  
Line 44: Line 44:
 ===== The patch ===== ===== The patch =====
  
-Could not be much simpler... +https://github.com/sgolemon/php-src/compare/master...trailing-comma
- +
-  diff --git a/Zend/zend_language_parser.y b/Zend/zend_language_parser.y +
-  index ccbc9b1..6b6de2e 100644 +
-  --- a/Zend/zend_language_parser.+
-  +++ b/Zend/zend_language_parser.+
-  @@ -515,7 +515,7 @@ new_else_single:   +
-    +
-    +
-   parameter_list: +
-  -               non_empty_parameter_list +
-  +               non_empty_parameter_list possible_comma +
-          |       /* empty */ +
-   ; +
-    +
-  @@ -542,7 +542,7 @@ optional_class_type: +
-   +
-   function_call_parameter_list: +
-                  '(' ')' { Z_LVAL($$.u.constant) = 0; } +
-        |       '(' non_empty_function_call_parameter_list ')'  { $$ = $2; } +
-  +             '(' non_empty_function_call_parameter_list possible_comma ')'   { $$ = $2; } +
-          |       '(' yield_expr ')'      { Z_LVAL($$.u.constant) = 1; zend_do_pass_param(&$2, ZEND_SEND_VAL, Z_LVAL($$.u.constant) TSRMLS_CC); } +
-   ; +
-   +
  
 +HipHop version: https://github.com/facebook/hiphop-php/commit/c1b7da6a4c128af5ddfc75f515c205de9f417a1e
 ===== What's left out on purpose ===== ===== What's left out on purpose =====
  
Line 91: Line 69:
   }   }
  
-===== Tests =====+===== Vote ===== 
 + 
 +Note: Consideration for 5.6 inclusion, not 5.5.
  
-Yes, I'll write some.+<doodle  
 +title="Should the current optional trailing comma implementation be merged" auth="pollita" voteType="single" closed="True"> 
 +   Yes 
 +   * No 
 +</doodle>
  
 ===== Changelog ===== ===== Changelog =====
  
   * Expanded proposal to include declarations as well as arguments 2013-02-20 11:23 GMT   * Expanded proposal to include declarations as well as arguments 2013-02-20 11:23 GMT
rfc/trailing-comma-function-args.1361415745.txt.gz · Last modified: 2017/09/22 13:28 (external edit)