1
0
mirror of https://github.com/nikic/PHP-Parser.git synced 2025-05-03 03:57:50 +02:00

Disallow new without a class name

Fixes .
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

@ -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)
--------------------------

@ -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

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