@jorgsowa/php-parser 3.2.5-1 → 3.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
*
|
|
3
3
|
* Package: @jorgsowa/php-parser
|
|
4
4
|
* Parse PHP code from JS and returns its AST
|
|
5
|
-
* Build:
|
|
5
|
+
* Build: 63b6cdec1729bc049a82 - 1/6/2026
|
|
6
6
|
* Copyright (C) 2021 Glayzzle (BSD-3-Clause)
|
|
7
7
|
* @authors https://github.com/glayzzle/php-parser/graphs/contributors
|
|
8
8
|
* @url http://glayzzle.com
|
package/package.json
CHANGED
|
@@ -1,37 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jorgsowa/php-parser",
|
|
3
|
-
"version": "3.2.5
|
|
3
|
+
"version": "3.2.5",
|
|
4
4
|
"description": "Parse PHP code from JS and returns its AST",
|
|
5
|
-
"main": "src/index.js",
|
|
6
|
-
"browser": "dist/php-parser.js",
|
|
7
|
-
"files": [
|
|
8
|
-
"src",
|
|
9
|
-
"dist",
|
|
10
|
-
"types.d.ts",
|
|
11
|
-
"LICENSE"
|
|
12
|
-
],
|
|
13
|
-
"types": "types.d.ts",
|
|
14
|
-
"scripts": {
|
|
15
|
-
"fix": "eslint . --fix",
|
|
16
|
-
"test": "jest",
|
|
17
|
-
"prepublishOnly": "yarpm run build",
|
|
18
|
-
"prebuild": "yarpm run test",
|
|
19
|
-
"build": "webpack --config webpack.config.js",
|
|
20
|
-
"-postbuild": "yarpm run build-docs",
|
|
21
|
-
"build-docs": "jsdoc -c .jsdoc.json",
|
|
22
|
-
"build-types": "jsdoc -t node_modules/tsd-jsdoc/dist -r src -d . && prettier -w types.d.ts",
|
|
23
|
-
"publish-docs": "git subtree push --prefix docs origin gh-pages",
|
|
24
|
-
"benchmark": "node test/benchmark.js",
|
|
25
|
-
"prepare": "husky"
|
|
26
|
-
},
|
|
27
|
-
"repository": {
|
|
28
|
-
"type": "git",
|
|
29
|
-
"url": "https://github.com/glayzzle/php-parser"
|
|
30
|
-
},
|
|
31
|
-
"bugs": {
|
|
32
|
-
"url": "https://github.com/glayzzle/php-parser/issues"
|
|
33
|
-
},
|
|
34
|
-
"homepage": "https://glayzzle.com/",
|
|
35
5
|
"keywords": [
|
|
36
6
|
"php",
|
|
37
7
|
"php5",
|
|
@@ -42,6 +12,15 @@
|
|
|
42
12
|
"tokenizer",
|
|
43
13
|
"ast"
|
|
44
14
|
],
|
|
15
|
+
"homepage": "https://glayzzle.com/",
|
|
16
|
+
"bugs": {
|
|
17
|
+
"url": "https://github.com/glayzzle/php-parser/issues"
|
|
18
|
+
},
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "git+https://github.com/glayzzle/php-parser.git"
|
|
22
|
+
},
|
|
23
|
+
"license": "BSD-3-Clause",
|
|
45
24
|
"author": "Ioan CHIRIAC",
|
|
46
25
|
"contributors": [
|
|
47
26
|
{
|
|
@@ -55,7 +34,33 @@
|
|
|
55
34
|
"url": "https://twitter.com/chrzosel"
|
|
56
35
|
}
|
|
57
36
|
],
|
|
58
|
-
"
|
|
37
|
+
"type": "commonjs",
|
|
38
|
+
"main": "src/index.js",
|
|
39
|
+
"browser": "dist/php-parser.js",
|
|
40
|
+
"types": "types.d.ts",
|
|
41
|
+
"directories": {
|
|
42
|
+
"doc": "docs",
|
|
43
|
+
"test": "test"
|
|
44
|
+
},
|
|
45
|
+
"files": [
|
|
46
|
+
"src",
|
|
47
|
+
"dist",
|
|
48
|
+
"types.d.ts",
|
|
49
|
+
"LICENSE"
|
|
50
|
+
],
|
|
51
|
+
"scripts": {
|
|
52
|
+
"fix": "eslint . --fix",
|
|
53
|
+
"test": "jest",
|
|
54
|
+
"prepublishOnly": "yarpm run build",
|
|
55
|
+
"prebuild": "yarpm run test",
|
|
56
|
+
"build": "webpack --config webpack.config.js",
|
|
57
|
+
"-postbuild": "yarpm run build-docs",
|
|
58
|
+
"build-docs": "jsdoc -c .jsdoc.json",
|
|
59
|
+
"build-types": "jsdoc -t node_modules/tsd-jsdoc/dist -r src -d . && prettier -w types.d.ts",
|
|
60
|
+
"publish-docs": "git subtree push --prefix docs origin gh-pages",
|
|
61
|
+
"benchmark": "node test/benchmark.js",
|
|
62
|
+
"prepare": "husky"
|
|
63
|
+
},
|
|
59
64
|
"devDependencies": {
|
|
60
65
|
"@babel/core": "^7.27.4",
|
|
61
66
|
"@babel/preset-env": "^7.27.2",
|
|
@@ -81,6 +86,5 @@
|
|
|
81
86
|
"webpack": "5.96.0",
|
|
82
87
|
"webpack-cli": "^6.0.1",
|
|
83
88
|
"yarpm": "^1.2.0"
|
|
84
|
-
}
|
|
85
|
-
"dependencies": {}
|
|
89
|
+
}
|
|
86
90
|
}
|
package/src/parser/variable.js
CHANGED
|
@@ -105,6 +105,7 @@ module.exports = {
|
|
|
105
105
|
name = this.next().read_expr();
|
|
106
106
|
this.expect("}") && this.next();
|
|
107
107
|
offset = offset("literal", name, null);
|
|
108
|
+
this.expect("(");
|
|
108
109
|
} else {
|
|
109
110
|
this.error([this.tok.T_VARIABLE, this.tok.T_STRING]);
|
|
110
111
|
// graceful mode : set getter as error node and continue
|