php-parser
Advanced tools
Comparing version 3.1.0 to 3.1.1
@@ -5,3 +5,3 @@ /*! | ||
* Parse PHP code from JS and returns its AST | ||
* Build: 9b163ea0469ec4cfc4e1 - 8/10/2022 | ||
* Build: f0b00a69c4c75a8f3c9a - 9/13/2022 | ||
* Copyright (C) 2021 Glayzzle (BSD-3-Clause) | ||
@@ -8,0 +8,0 @@ * @authors https://github.com/glayzzle/php-parser/graphs/contributors |
{ | ||
"name": "php-parser", | ||
"version": "3.1.0", | ||
"version": "3.1.1", | ||
"description": "Parse PHP code from JS and returns its AST", | ||
@@ -65,13 +65,13 @@ "main": "src/index.js", | ||
"devDependencies": { | ||
"@babel/core": "^7.18.10", | ||
"@babel/preset-env": "^7.18.10", | ||
"@babel/core": "^7.19.0", | ||
"@babel/preset-env": "^7.19.0", | ||
"babel-loader": "^8.0.5", | ||
"benchmark": "^2.1.4", | ||
"coveralls": "^3.0.3", | ||
"eslint": "^8.21.0", | ||
"eslint-plugin-jest": "^26.8.2", | ||
"eslint": "^8.23.1", | ||
"eslint-plugin-jest": "^27.0.4", | ||
"eslint-plugin-prettier": "^4.2.1", | ||
"husky": "^8.0.1", | ||
"jest": "^28.1.3", | ||
"jest-runner-eslint": "^1.0.1", | ||
"jest": "^29.0.3", | ||
"jest-runner-eslint": "^1.1.0", | ||
"jsdoc": "^3.6.11", | ||
@@ -78,0 +78,0 @@ "jsdoc-template": "^1.2.0", |
@@ -260,3 +260,2 @@ /** | ||
if (this.token === this.tok.T_ATTRIBUTE) attrs = this.read_attr_list(); | ||
const flags = this.read_promoted(); | ||
@@ -274,2 +273,19 @@ if (this.version >= 801 && this.token === this.tok.T_READ_ONLY) { | ||
const flags = this.read_promoted(); | ||
if ( | ||
!readonly && | ||
this.version >= 801 && | ||
this.token === this.tok.T_READ_ONLY | ||
) { | ||
if (is_class_constructor) { | ||
this.next(); | ||
readonly = true; | ||
} else { | ||
this.raiseError( | ||
"readonly properties can be used only on class constructor" | ||
); | ||
} | ||
} | ||
if (this.token === "?") { | ||
@@ -276,0 +292,0 @@ this.next(); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
808486
22380