@webassemblyjs/wast-printer
Advanced tools
Comparing version 1.2.2 to 1.2.3
@@ -10,2 +10,4 @@ "use strict"; | ||
var _ast = require("@webassemblyjs/ast"); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -229,4 +231,8 @@ | ||
out += "func"; | ||
out += space; | ||
out += printIdentifier(n.id); | ||
if ((0, _ast.isAnonymous)(n.id) === false) { | ||
out += space; | ||
out += printIdentifier(n.id); | ||
} | ||
n.params.forEach(function (param) { | ||
@@ -302,3 +308,3 @@ out += space; | ||
if (n.name != null) { | ||
if (n.name != null && (0, _ast.isAnonymous)(n.name) === false) { | ||
out += printIdentifier(n.name); | ||
@@ -321,9 +327,9 @@ out += space; | ||
out += "table"; | ||
out += space; | ||
if (n.name != null) { | ||
if (n.name != null && (0, _ast.isAnonymous)(n.name) === false) { | ||
out += printIdentifier(n.name); | ||
out += space; | ||
out += printIdentifier(n.name); | ||
} | ||
out += space; | ||
out += printLimit(n.limits); | ||
@@ -354,3 +360,3 @@ out += space; | ||
if (n.name != null) { | ||
if (n.name.type === "Identifier") { | ||
if (n.name.type === "Identifier" && (0, _ast.isAnonymous)(n.name) === false) { | ||
out += space; | ||
@@ -431,3 +437,3 @@ out += printIdentifier(n.name); | ||
if (n.label != null) { | ||
if (n.label != null && (0, _ast.isAnonymous)(n.label) === false) { | ||
out += space; | ||
@@ -483,3 +489,3 @@ out += printIdentifier(n.label); | ||
if (n.testLabel != null) { | ||
if (n.testLabel != null && (0, _ast.isAnonymous)(n.testLabel) === false) { | ||
out += space; | ||
@@ -591,3 +597,3 @@ out += printIdentifier(n.testLabel); | ||
if (n.label != null) { | ||
if (n.label != null && (0, _ast.isAnonymous)(n.label) === false) { | ||
out += space; | ||
@@ -669,3 +675,3 @@ out += printIdentifier(n.label); | ||
if (n.type === "Identifier") { | ||
if (n.type === "Identifier" && (0, _ast.isAnonymous)(n) === false) { | ||
out += printIdentifier(n); | ||
@@ -672,0 +678,0 @@ } |
{ | ||
"name": "@webassemblyjs/wast-printer", | ||
"version": "1.2.2", | ||
"version": "1.2.3", | ||
"description": "WebAssembly text format printer", | ||
@@ -20,3 +20,4 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@webassemblyjs/wast-parser": "1.2.2", | ||
"@webassemblyjs/ast": "1.2.3", | ||
"@webassemblyjs/wast-parser": "1.2.3", | ||
"long": "^3.2.0" | ||
@@ -23,0 +24,0 @@ }, |
// @flow | ||
import Long from "long"; | ||
import { isAnonymous } from "@webassemblyjs/ast"; | ||
@@ -230,5 +231,7 @@ const compact = false; | ||
out += "func"; | ||
out += space; | ||
out += printIdentifier(n.id); | ||
if (isAnonymous(n.id) === false) { | ||
out += space; | ||
out += printIdentifier(n.id); | ||
} | ||
@@ -315,6 +318,5 @@ n.params.forEach(param => { | ||
out += "global"; | ||
out += space; | ||
if (n.name != null) { | ||
if (n.name != null && isAnonymous(n.name) === false) { | ||
out += printIdentifier(n.name); | ||
@@ -341,9 +343,9 @@ out += space; | ||
out += "table"; | ||
out += space; | ||
if (n.name != null) { | ||
if (n.name != null && isAnonymous(n.name) === false) { | ||
out += printIdentifier(n.name); | ||
out += space; | ||
out += printIdentifier(n.name); | ||
} | ||
out += space; | ||
out += printLimit(n.limits); | ||
@@ -379,3 +381,3 @@ out += space; | ||
if (n.name != null) { | ||
if (n.name.type === "Identifier") { | ||
if (n.name.type === "Identifier" && isAnonymous(n.name) === false) { | ||
out += space; | ||
@@ -463,3 +465,3 @@ out += printIdentifier(n.name); | ||
if (n.label != null) { | ||
if (n.label != null && isAnonymous(n.label) === false) { | ||
out += space; | ||
@@ -522,3 +524,3 @@ out += printIdentifier(n.label); | ||
if (n.testLabel != null) { | ||
if (n.testLabel != null && isAnonymous(n.testLabel) === false) { | ||
out += space; | ||
@@ -641,3 +643,3 @@ out += printIdentifier(n.testLabel); | ||
if (n.label != null) { | ||
if (n.label != null && isAnonymous(n.label) === false) { | ||
out += space; | ||
@@ -723,3 +725,3 @@ out += printIdentifier(n.label); | ||
if (n.type === "Identifier") { | ||
if (n.type === "Identifier" && isAnonymous(n) === false) { | ||
out += printIdentifier(n); | ||
@@ -726,0 +728,0 @@ } |
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
27673
1236
3
+ Added@webassemblyjs/ast@1.2.3
+ Added@webassemblyjs/ast@1.2.3(transitive)
+ Added@webassemblyjs/floating-point-hex-parser@1.2.3(transitive)
+ Added@webassemblyjs/helper-fsm@1.2.3(transitive)
+ Added@webassemblyjs/helper-wasm-bytecode@1.2.3(transitive)
+ Added@webassemblyjs/leb128@1.2.3(transitive)
+ Added@webassemblyjs/wasm-parser@1.2.3(transitive)
+ Added@webassemblyjs/wast-parser@1.2.3(transitive)
+ Addedwebassemblyjs@1.2.3(transitive)
- Removed@webassemblyjs/ast@1.2.2(transitive)
- Removed@webassemblyjs/helper-leb128@1.2.2(transitive)
- Removed@webassemblyjs/helper-wasm-bytecode@1.2.2(transitive)
- Removed@webassemblyjs/wasm-parser@1.2.2(transitive)
- Removed@webassemblyjs/wast-parser@1.2.2(transitive)
- Removedwebassembly-floating-point-hex-parser@0.1.2(transitive)
- Removedwebassemblyjs@1.2.2(transitive)