@webassemblyjs/wast-parser
Advanced tools
Comparing version 1.2.6 to 1.2.7
@@ -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)) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
127032
3893
1
+ Added@webassemblyjs/ast@1.2.7(transitive)
+ Added@webassemblyjs/floating-point-hex-parser@1.2.7(transitive)
+ Added@webassemblyjs/helper-code-frame@1.2.7(transitive)
+ Added@webassemblyjs/helper-fsm@1.2.7(transitive)
+ Added@webassemblyjs/helper-wasm-bytecode@1.2.7(transitive)
+ Added@webassemblyjs/leb128@1.2.7(transitive)
+ Added@webassemblyjs/validation@1.2.7(transitive)
+ Added@webassemblyjs/wasm-parser@1.2.7(transitive)
+ Added@webassemblyjs/wast-printer@1.2.7(transitive)
+ Addedwebassemblyjs@1.2.7(transitive)
- Removed@webassemblyjs/ast@1.2.6(transitive)
- Removed@webassemblyjs/floating-point-hex-parser@1.2.6(transitive)
- Removed@webassemblyjs/helper-code-frame@1.2.6(transitive)
- Removed@webassemblyjs/helper-fsm@1.2.6(transitive)
- Removed@webassemblyjs/helper-wasm-bytecode@1.2.6(transitive)
- Removed@webassemblyjs/leb128@1.2.6(transitive)
- Removed@webassemblyjs/wasm-parser@1.2.6(transitive)
- Removed@webassemblyjs/wast-printer@1.2.6(transitive)
- Removedwebassemblyjs@1.2.6(transitive)
Updated@webassemblyjs/ast@1.2.7
Updatedwebassemblyjs@1.2.7