Skip to content

Commit 3118334

Browse files
committed
fix class namespace reading on new statements
1 parent 9047eca commit 3118334

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/parser/expr.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,11 @@ module.exports = {
461461
* ```
462462
*/
463463
,read_class_name_reference: function() {
464-
if (this.token === '\\' || this.token === this.tok.T_STRING) {
464+
if (
465+
this.token === this.tok.T_NS_SEPARATOR ||
466+
this.token === this.tok.T_STRING ||
467+
this.token === this.tok.T_NAMESPACE
468+
) {
465469
var result = this.read_namespace_name();
466470
if (this.token === this.tok.T_DOUBLE_COLON) {
467471
result = this.read_static_getter(result);

0 commit comments

Comments
 (0)