Socket
Socket
Sign inDemoInstall

@webassemblyjs/wast-parser

Package Overview
Dependencies
Maintainers
1
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@webassemblyjs/wast-parser - npm Package Compare versions

Comparing version 1.2.6 to 1.2.7

14

lib/grammar.js

@@ -972,5 +972,7 @@ "use strict";

function parseFuncInstr() {
var startLoc = token.loc.start;
/**
* A simple instruction
*/
if (token.type === tokens.name || token.type === tokens.valtype) {

@@ -994,6 +996,8 @@ var _name2 = token.value;

if (token.type === tokens.closeParen) {
var _endLoc = token.loc.end;
if (typeof object === "undefined") {
return t.instruction(_name2);
return t.withLoc(t.instruction(_name2), _endLoc, startLoc);
} else {
return t.objectInstruction(_name2, object, []);
return t.withLoc(t.objectInstruction(_name2, object, []), _endLoc, startLoc);
}

@@ -1008,6 +1012,8 @@ }

var endLoc = token.loc.end;
if (typeof object === "undefined") {
return t.instruction(_name2, _args, _namedArgs);
return t.withLoc(t.instruction(_name2, _args, _namedArgs), endLoc, startLoc);
} else {
return t.objectInstruction(_name2, object, _args, _namedArgs);
return t.withLoc(t.objectInstruction(_name2, object, _args, _namedArgs), endLoc, startLoc);
}

@@ -1014,0 +1020,0 @@ } else if (isKeyword(token, keywords.loop)) {

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

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

"dependencies": {
"@webassemblyjs/ast": "1.2.6",
"@webassemblyjs/floating-point-hex-parser": "1.2.6",
"@webassemblyjs/helper-code-frame": "1.2.6",
"@webassemblyjs/helper-fsm": "1.2.6",
"@webassemblyjs/ast": "1.2.7",
"@webassemblyjs/floating-point-hex-parser": "1.2.7",
"@webassemblyjs/helper-code-frame": "1.2.7",
"@webassemblyjs/helper-fsm": "1.2.7",
"long": "^3.2.0",
"webassemblyjs": "1.2.6"
"webassemblyjs": "1.2.7"
},
"devDependencies": {
"@webassemblyjs/helper-test-framework": "1.2.7"
},
"repository": {

@@ -29,0 +32,0 @@ "type": "git",

@@ -1041,2 +1041,4 @@ // @flow

function parseFuncInstr(): Instruction {
const startLoc = token.loc.start;
/**

@@ -1066,6 +1068,12 @@ * A simple instruction

if (token.type === tokens.closeParen) {
const endLoc = token.loc.end;
if (typeof object === "undefined") {
return t.instruction(name);
return t.withLoc(t.instruction(name), endLoc, startLoc);
} else {
return t.objectInstruction(name, object, []);
return t.withLoc(
t.objectInstruction(name, object, []),
endLoc,
startLoc
);
}

@@ -1078,6 +1086,16 @@ }

const endLoc = token.loc.end;
if (typeof object === "undefined") {
return t.instruction(name, args, namedArgs);
return t.withLoc(
t.instruction(name, args, namedArgs),
endLoc,
startLoc
);
} else {
return t.objectInstruction(name, object, args, namedArgs);
return t.withLoc(
t.objectInstruction(name, object, args, namedArgs),
endLoc,
startLoc
);
}

@@ -1084,0 +1102,0 @@ } else if (isKeyword(token, keywords.loop)) {

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