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

shift-parser

Package Overview
Dependencies
Maintainers
4
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shift-parser - npm Package Compare versions

Comparing version 4.1.2 to 4.1.3

12

dist/early-error-state.js
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.EarlyError = exports.EarlyErrorState = undefined;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /**

@@ -19,7 +24,2 @@ * Copyright 2014 Shape Security, Inc.

Object.defineProperty(exports, "__esModule", {
value: true
});
exports.EarlyError = exports.EarlyErrorState = undefined;
require("es6-map/implement");

@@ -49,3 +49,3 @@

var identity = undefined; // initialised below EarlyErrorState
var identity = void 0; // initialised below EarlyErrorState

@@ -52,0 +52,0 @@ var EarlyErrorState = exports.EarlyErrorState = function () {

"use strict";
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
Object.defineProperty(exports, "__esModule", {

@@ -12,2 +8,6 @@ value: true

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
var _shiftReducer = require("shift-reducer");

@@ -14,0 +14,0 @@

@@ -13,3 +13,3 @@ "use strict";

get: function get() {
return _tokenizer.default;
return _interopRequireDefault(_tokenizer).default;
}

@@ -34,2 +34,4 @@ });

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function markLocation(node, location) {

@@ -36,0 +38,0 @@ node.loc = {

"use strict";
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
Object.defineProperty(exports, "__esModule", {

@@ -9,2 +7,4 @@ value: true

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

@@ -11,0 +11,0 @@

"use strict";
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
Object.defineProperty(exports, "__esModule", {

@@ -12,2 +8,6 @@ value: true

var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _utils = require("./utils");

@@ -669,3 +669,3 @@

var hexDigits = 0,
ch = undefined;
ch = void 0;
while (i < this.source.length) {

@@ -686,2 +686,6 @@ ch = this.source.charAt(i);

}
if (i === this.index + 1) {
++this.index; // This is so that the error is 'Unexpected "}"' instead of 'Unexpected "{"'.
throw this.createILLEGAL();
}
this.index = i + 1;

@@ -887,7 +891,7 @@ return hexDigits;

if (this.index + 1 < this.source.length) {
var ch2 = this.source.charAt(this.index + 1);
if (ch1 === ch2) {
var _ch = this.source.charAt(this.index + 1);
if (ch1 === _ch) {
if (this.index + 2 < this.source.length) {
var ch3 = this.source.charAt(this.index + 2);
if (ch1 === ">" && ch3 === ">") {
var _ch2 = this.source.charAt(this.index + 2);
if (ch1 === ">" && _ch2 === ">") {
// 4-character punctuator: >>>=

@@ -900,7 +904,7 @@ if (this.index + 3 < this.source.length && this.source.charAt(this.index + 3) === "=") {

if (ch1 === "<" && ch3 === "=") {
if (ch1 === "<" && _ch2 === "=") {
return TokenType.ASSIGN_SHL;
}
if (ch1 === ">" && ch3 === "=") {
if (ch1 === ">" && _ch2 === "=") {
return TokenType.ASSIGN_SHR;

@@ -927,3 +931,3 @@ }

}
} else if (ch1 === "=" && ch2 === ">") {
} else if (ch1 === "=" && _ch === ">") {
return TokenType.ARROW;

@@ -1208,3 +1212,3 @@ }

case "x":
var unescaped = undefined;
var unescaped = void 0;
this.index++;

@@ -1395,11 +1399,11 @@ if (this.index >= this.source.length) {

while (this.index < this.source.length) {
var ch = this.source.charAt(this.index);
if (ch === "\\") {
var _ch3 = this.source.charAt(this.index);
if (_ch3 === "\\") {
throw this.createError(_errors.ErrorMessages.INVALID_REGEXP_FLAGS);
}
if (!(0, _utils.isIdentifierPart)(ch.charCodeAt(0))) {
if (!(0, _utils.isIdentifierPart)(_ch3.charCodeAt(0))) {
break;
}
this.index++;
str += ch;
str += _ch3;
}

@@ -1406,0 +1410,0 @@ return { type: TokenType.REGEXP, value: str, slice: this.getSlice(start, startLocation) };

{
"name": "shift-parser",
"version": "4.1.2",
"version": "4.1.3",
"description": "ECMAScript parser that produces a Shift format AST",

@@ -5,0 +5,0 @@ "author": "Shape Security Labs",

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