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.1.0-beta.8 to 3.1.0-beta.9

2

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

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

* Parse PHP code from JS and returns its AST
* Build: ad4444bf143d4b60fac4 - 5/25/2022
* Build: c9dd0a56ea3dc3b1f750 - 5/30/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-beta.8",
"version": "3.1.0-beta.9",
"description": "Parse PHP code from JS and returns its AST",

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

@@ -35,2 +35,25 @@ /**

// https://github.com/php/php-src/blob/master/Zend/zend_language_scanner.l#L1546
if (id === this.tok.T_ENUM) {
if (this.version < 801) {
return this.tok.T_STRING;
}
const initial = this.offset;
let ch = this.input();
while (ch == " ") {
ch = this.input();
}
let isEnum = false;
if (this.is_LABEL_START()) {
while (this.is_LABEL()) {
ch += this.input();
}
const label = ch.slice(0, -1).toLowerCase();
isEnum = label !== "extends" && label !== "implements";
}
this.unput(this.offset - initial);
return isEnum ? this.tok.T_ENUM : this.tok.T_STRING;
}
if (this.offset < this.size && id !== this.tok.T_YIELD_FROM) {

@@ -37,0 +60,0 @@ // If immediately followed by a backslash, this is a T_NAME_RELATIVE or T_NAME_QUALIFIED.

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