-/* Generated by re2c 0.13.5 on Sun Jan 1 17:48:29 2012 */
+/* Generated by re2c 0.13.5 on Mon Jan 16 14:45:55 2012 */
#line 1 "Zend/zend_language_scanner.l"
/*
+----------------------------------------------------------------------+
if (CG(active_class_entry)
&& (ZEND_ACC_TRAIT ==
(CG(active_class_entry)->ce_flags & ZEND_ACC_TRAIT))) {
- // This is a hack, we abuse IS_NULL to indicate an invalid value
- // if __CLASS__ is encountered in a trait, however, we also not that we
- // should fix it up when we copy the method into an actual class
- zendlval->value.lval = ZEND_ACC_TRAIT;
- zendlval->type = IS_NULL;
+ /* We create a special __CLASS__ constant that is going to be resolved
+ at run-time */
+ zendlval->value.str.len = sizeof("__CLASS__")-1;
+ zendlval->value.str.val = estrndup("__CLASS__", zendlval->value.str.len);
+ zendlval->type = IS_CONSTANT;
} else {
if (CG(active_class_entry)) {
class_name = CG(active_class_entry)->name;