Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

php-parser

Package Overview
Dependencies
Maintainers
2
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

php-parser - npm Package Compare versions

Comparing version 3.2.1 to 3.2.2

2

dist/php-parser.min.js.LICENSE.txt

@@ -5,3 +5,3 @@ /*!

* Parse PHP code from JS and returns its AST
* Build: c6475ce077753ea0c1a9 - 11/10/2024
* Build: 546cb0da384f6fc5d54c - 12/31/2024
* 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.2.1",
"version": "3.2.2",
"description": "Parse PHP code from JS and returns its AST",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -33,3 +33,3 @@ /**

this.short_tags = false;
this.version = 801;
this.version = 803;
this.yyprevcol = 0;

@@ -36,0 +36,0 @@ this.keywords = {

@@ -39,3 +39,3 @@ /**

this.debug = false;
this.version = 801;
this.version = 803;
this.extractDoc = false;

@@ -42,0 +42,0 @@ this.extractTokens = false;

@@ -204,18 +204,11 @@ /**

propName = propName(name);
if (this.token === ";" || this.token === ",") {
return result(propName, null, readonly, nullable, type, attrs || []);
} else if (this.token === "=") {
let value = null;
this.expect([",", ";", "="]);
if (this.token === "=") {
// https://github.com/php/php-src/blob/master/Zend/zend_language_parser.y#L815
return result(
propName,
this.next().read_expr(),
readonly,
nullable,
type,
attrs || [],
);
} else {
this.expect([",", ";", "="]);
return result(propName, null, nullable, type, attrs || []);
value = this.next().read_expr();
}
return result(propName, value, readonly, nullable, type, attrs || []);
},

@@ -239,3 +232,3 @@ ",",

const [nullable, type] =
this.version >= 830 ? this.read_optional_type() : [false, null];
this.version >= 803 ? this.read_optional_type() : [false, null];

@@ -369,2 +362,7 @@ const result = this.node("classconstant");

}
if (this.peek() === "=") {
return [false, null];
}
let type = this.read_types();

@@ -371,0 +369,0 @@ if (nullable && !type) {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc