Created
February 19, 2013 17:40
-
-
Save nikita2206/4988075 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Zend/zend_language_parser.y b/Zend/zend_language_parser.y | |
index ccbc9b1..75b2431 100644 | |
--- a/Zend/zend_language_parser.y | |
+++ b/Zend/zend_language_parser.y | |
@@ -588,7 +588,7 @@ class_statement: | |
variable_modifiers { CG(access_type) = Z_LVAL($1.u.constant); } class_variable_declaration ';' | |
| class_constant_declaration ';' | |
| trait_use_statement | |
- | method_modifiers function is_reference T_STRING { zend_do_begin_function_declaration(&$2, &$4, 1, $3.op_type, &$1 TSRMLS_CC); } | |
+ | method_modifiers method_definition is_reference T_STRING { zend_do_begin_function_declaration(&$2, &$4, 1, $3.op_type, &$1 TSRMLS_CC); } | |
'(' parameter_list ')' | |
method_body { zend_do_abstract_method(&$4, &$1, &$9 TSRMLS_CC); zend_do_end_function_declaration(&$2 TSRMLS_CC); } | |
; | |
@@ -835,6 +835,11 @@ function: | |
T_FUNCTION { $$.u.op.opline_num = CG(zend_lineno); } | |
; | |
+method_definition: | |
+ T_FUNCTION { $$.u.op.opline_num = CG(zend_lineno); } | |
+ | /* method definition without function keyword */ { $$.u.op.opline_num = CG(zend_lineno); } | |
+; | |
+ | |
lexical_vars: | |
/* empty */ | |
| T_USE '(' lexical_var_list ')' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment