summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndi Gutmans <andi@php.net>2003-10-28 23:44:23 +0000
committerAndi Gutmans <andi@php.net>2003-10-28 23:44:23 +0000
commit530789987fef985c42e6c7fbf4e8b11bafb86c9f (patch)
tree4806a18f6a45be2852c904a331f186ff9b5b22d3
parent495fd01ca4747e03cb657222eb7bd1feaa89e6aa (diff)
downloadphp-git-530789987fef985c42e6c7fbf4e8b11bafb86c9f.tar.gz
- Head up! I'm reverting the patch which allows for expressions in constant
- declerations. Allowing the access of other constants in this code is - flawed. We are reverting back to PHP 4's static scalars. - Don't worry if you get the following msg when compiling: - "zend_language_parser.y contains 3 useless nonterminals and 22 useless rules" - I didn't nuke the code in case we have some brilliant ideas after beta 2
-rw-r--r--Zend/zend_language_parser.y4
1 files changed, 2 insertions, 2 deletions
diff --git a/Zend/zend_language_parser.y b/Zend/zend_language_parser.y
index 2160eefc1d..a4dd357a01 100644
--- a/Zend/zend_language_parser.y
+++ b/Zend/zend_language_parser.y
@@ -495,8 +495,8 @@ class_variable_declaration:
;
class_constant_declaration:
- class_constant_declaration ',' T_STRING '=' const_scalar_expr { zend_do_declare_class_constant(&$3, &$5 TSRMLS_CC); }
- | T_CONST T_STRING '=' const_scalar_expr { zend_do_declare_class_constant(&$2, &$4 TSRMLS_CC); }
+ class_constant_declaration ',' T_STRING '=' static_scalar { zend_do_declare_class_constant(&$3, &$5 TSRMLS_CC); }
+ | T_CONST T_STRING '=' static_scalar { zend_do_declare_class_constant(&$2, &$4 TSRMLS_CC); }
;
echo_expr_list: