Disallow new without a class name

Fixes #137.
This commit is contained in:
nikic 2014-09-28 12:41:35 +02:00
parent 2b96ab8edc
commit 3e1665bbbd
4 changed files with 282 additions and 280 deletions

View File

@ -1,7 +1,7 @@
Version 1.0.1-dev
-----------------
Nothing yet.
* Disallow `new` expressions without a class name.
Version 1.0.0 (12.09.2014)
--------------------------

View File

@ -705,7 +705,7 @@ class_name_or_var:
;
object_access_for_dcnr:
| base_variable T_OBJECT_OPERATOR object_property
base_variable T_OBJECT_OPERATOR object_property
{ $$ = Expr\PropertyFetch[$1, $3]; }
| object_access_for_dcnr T_OBJECT_OPERATOR object_property
{ $$ = Expr\PropertyFetch[$1, $3]; }

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,6 @@
New without a class
-----
<?php
new;
-----
Syntax error, unexpected ';' on line 2