Socket
Socket
Sign inDemoInstall

@webassemblyjs/wast-parser

Package Overview
Dependencies
16
Maintainers
1
Versions
86
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.5.4 to 1.5.5

86

lib/grammar.js

@@ -8,2 +8,6 @@ "use strict";

var _helperCodeFrame = require("@webassemblyjs/helper-code-frame");
var _mamacro = require("mamacro");
var _numberLiterals = require("./number-literals");

@@ -13,4 +17,2 @@

var _helperCodeFrame = require("@webassemblyjs/helper-code-frame");
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

@@ -101,3 +103,2 @@

return new Error("\n" + (0, _helperCodeFrame.codeFrameFromSource)(source, token.loc) + "\n" + "unknown export index" + ", given " + tokenToString(token));
return undefined;
}();

@@ -129,4 +130,14 @@ }

function maybeIgnoreComment() {
if (typeof token === "undefined") {
// Ignore
return;
}
while (token.type === tokens.comment) {
eatToken();
if (typeof token === "undefined") {
// Hit the end
break;
}
}

@@ -188,3 +199,2 @@ }

return new Error("\n" + (0, _helperCodeFrame.codeFrameFromSource)(source, token.loc) + "\n" + "Expected string in export" + ", given " + tokenToString(token));
return undefined;
}();

@@ -324,7 +334,3 @@ }

throw function () {
var _ret;
return new Error("\n" + (0, _helperCodeFrame.codeFrameFromSource)(source, token.loc) + "\n" + "Expected string in export" + ", given " + tokenToString(token));
_ret = undefined;
return _ret;
}();

@@ -363,3 +369,2 @@ }

return new Error("\n" + (0, _helperCodeFrame.codeFrameFromSource)(source, token.loc) + "\n" + "Unexpected token" + ", given " + tokenToString(token));
_ret = undefined;
}();

@@ -430,7 +435,3 @@ }

throw function () {
var _ret2;
return new Error("\n" + (0, _helperCodeFrame.codeFrameFromSource)(source, token.loc) + "\n" + "Unexpected token in import of type" + ", given " + tokenToString(token));
_ret2 = undefined;
return _ret2;
}();

@@ -516,10 +517,7 @@ }

throw function () {
var _ret3;
return new Error("\n" + (0, _helperCodeFrame.codeFrameFromSource)(source, token.loc) + "\n" + "Unexpected token in block body of type" + ", given " + tokenToString(token));
_ret3 = undefined;
return _ret3;
}();
}
maybeIgnoreComment();
eatTokenOfType(tokens.closeParen);

@@ -592,7 +590,3 @@ }

throw function () {
var _ret4;
return new Error("\n" + (0, _helperCodeFrame.codeFrameFromSource)(source, token.loc) + "\n" + "Unexpected token in consequent body of type" + ", given " + tokenToString(token));
_ret4 = undefined;
return _ret4;
}();

@@ -623,7 +617,3 @@ }

throw function () {
var _ret5;
return new Error("\n" + (0, _helperCodeFrame.codeFrameFromSource)(source, token.loc) + "\n" + "Unexpected token in alternate body of type" + ", given " + tokenToString(token));
_ret5 = undefined;
return _ret5;
}();

@@ -651,7 +641,3 @@ }

throw function () {
var _ret6;
return new Error("\n" + (0, _helperCodeFrame.codeFrameFromSource)(source, token.loc) + "\n" + "Unexpected token in if body" + ", given " + tokenToString(token));
_ret6 = undefined;
return _ret6;
}();

@@ -703,7 +689,3 @@ }

throw function () {
var _ret7;
return new Error("\n" + (0, _helperCodeFrame.codeFrameFromSource)(source, token.loc) + "\n" + "Unexpected token in loop body" + ", given " + tokenToString(token));
_ret7 = undefined;
return _ret7;
}();

@@ -952,7 +934,3 @@ }

throw function () {
var _ret8;
return new Error("\n" + (0, _helperCodeFrame.codeFrameFromSource)(source, token.loc) + "\n" + "Unexpected token in nested instruction" + ", given " + tokenToString(token));
_ret8 = undefined;
return _ret8;
}();

@@ -967,3 +945,2 @@ }

return new Error("\n" + (0, _helperCodeFrame.codeFrameFromSource)(source, token.loc) + "\n" + "Unexpected token in instruction argument" + ", given " + tokenToString(token));
_ret8 = undefined;
}();

@@ -1050,2 +1027,3 @@ }

var startLoc = getStartLoc();
maybeIgnoreComment();
/**

@@ -1154,3 +1132,2 @@ * A simple instruction

return new Error("\n" + (0, _helperCodeFrame.codeFrameFromSource)(source, token.loc) + "\n" + "Unexpected instruction in function body" + ", given " + tokenToString(token));
return undefined;
}();

@@ -1218,7 +1195,3 @@ }

throw function () {
var _ret9;
return new Error("\n" + (0, _helperCodeFrame.codeFrameFromSource)(source, token.loc) + "\n" + "Unexpected token in func body" + ", given " + tokenToString(token));
_ret9 = undefined;
return _ret9;
}();

@@ -1243,3 +1216,2 @@ }

return new Error("\n" + (0, _helperCodeFrame.codeFrameFromSource)(source, token.loc) + "\n" + "Function export expected a string" + ", given " + tokenToString(token));
return undefined;
}();

@@ -1306,3 +1278,3 @@ }

eatToken(); // param
eatToken(); // result

@@ -1328,8 +1300,11 @@ result = parseFuncResult();

function parseFuncResult() {
var results = [];
var results = []; // type is optional
if (token.type === tokens.closeParen) {
return results;
}
if (token.type !== tokens.valtype) {
throw function () {
return new Error("\n" + (0, _helperCodeFrame.codeFrameFromSource)(source, token.loc) + "\n" + "Unexpected token in func result" + ", given " + tokenToString(token));
return undefined;
}();

@@ -1443,3 +1418,2 @@ }

return new Error("\n" + (0, _helperCodeFrame.codeFrameFromSource)(source, token.loc) + "\n" + "Unsupported global type, expected mut" + ", given " + tokenToString(token));
return undefined;
}();

@@ -1458,3 +1432,2 @@ }

return new Error("\n" + (0, _helperCodeFrame.codeFrameFromSource)(source, token.loc) + "\n" + "Could not determine global type" + ", given " + tokenToString(token));
return undefined;
}();

@@ -1525,4 +1498,3 @@ }

}
} else {
throw new Error("Function param has no valtype");
} else {// ignore
}

@@ -1585,7 +1557,3 @@

throw function () {
var _ret10;
return new Error("\n" + (0, _helperCodeFrame.codeFrameFromSource)(source, token.loc) + "\n" + "Unsupported token in elem" + ", given " + tokenToString(token));
_ret10 = undefined;
return _ret10;
}();

@@ -1657,2 +1625,3 @@ }

maybeIgnoreComment();
eatTokenOfType(tokens.closeParen);

@@ -1773,5 +1742,9 @@ return t.withLoc(_node2, _endLoc4, startLoc);

var endLoc = getEndLoc();
maybeIgnoreComment();
if (_typeof(instruction) === "object") {
eatTokenOfType(tokens.closeParen);
if (typeof token !== "undefined") {
eatTokenOfType(tokens.closeParen);
}
return t.withLoc(instruction, endLoc, startLoc);

@@ -1797,3 +1770,2 @@ }

return new Error("\n" + (0, _helperCodeFrame.codeFrameFromSource)(source, token.loc) + "\n" + "Unknown token" + ", given " + tokenToString(token));
return undefined;
}();

@@ -1800,0 +1772,0 @@ }

"use strict";
var _mamacro = require("mamacro");
var _helperFsm = require("@webassemblyjs/helper-fsm");

@@ -320,3 +322,2 @@

throw new Error(getCodeFrame(input, line, column) + "Unexpected character " + JSON.stringify(char));
undefined;
}

@@ -331,3 +332,2 @@

throw new Error(getCodeFrame(input, line, column) + "Unexpected character " + JSON.stringify(char));
undefined;
}

@@ -346,3 +346,2 @@

throw new Error(getCodeFrame(input, line, column) + "Unexpected character " + JSON.stringify(char));
undefined;
}

@@ -440,3 +439,2 @@

throw new Error(getCodeFrame(input, line, column) + "Unexpected character " + JSON.stringify(char));
undefined;
}

@@ -443,0 +441,0 @@

{
"name": "@webassemblyjs/wast-parser",
"version": "1.5.4",
"version": "1.5.5",
"description": "WebAssembly text format parser",

@@ -20,11 +20,12 @@ "keywords": [

"dependencies": {
"@webassemblyjs/ast": "1.5.4",
"@webassemblyjs/floating-point-hex-parser": "1.5.4",
"@webassemblyjs/helper-code-frame": "1.5.4",
"@webassemblyjs/helper-fsm": "1.5.4",
"@webassemblyjs/ast": "1.5.5",
"@webassemblyjs/floating-point-hex-parser": "1.5.5",
"@webassemblyjs/helper-code-frame": "1.5.5",
"@webassemblyjs/helper-fsm": "1.5.5",
"long": "^3.2.0",
"webassemblyjs": "1.5.4"
"mamacro": "^0.0.3",
"webassemblyjs": "1.5.5"
},
"devDependencies": {
"@webassemblyjs/helper-test-framework": "1.5.4"
"@webassemblyjs/helper-test-framework": "1.5.5"
},

@@ -31,0 +32,0 @@ "repository": {

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc