@webassemblyjs/ast
Advanced tools
Comparing version 1.2.2 to 1.2.3
@@ -24,5 +24,7 @@ "use strict"; | ||
exports.numberLiteral = numberLiteral; | ||
exports.getUniqueNameGenerator = getUniqueNameGenerator; | ||
exports.callInstruction = callInstruction; | ||
exports.ifInstruction = ifInstruction; | ||
exports.withLoc = withLoc; | ||
exports.withRaw = withRaw; | ||
exports.moduleImport = moduleImport; | ||
@@ -49,2 +51,3 @@ exports.globalImportDescr = globalImportDescr; | ||
exports.indexInFuncSection = indexInFuncSection; | ||
exports.isAnonymous = isAnonymous; | ||
Object.defineProperty(exports, "traverse", { | ||
@@ -390,2 +393,17 @@ enumerable: true, | ||
function getUniqueNameGenerator() { | ||
var inc = {}; | ||
return function () { | ||
var prefix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "temp"; | ||
if (!(prefix in inc)) { | ||
inc[prefix] = 0; | ||
} else { | ||
inc[prefix] = inc[prefix] + 1; | ||
} | ||
return prefix + "_" + inc[prefix]; | ||
}; | ||
} | ||
function callInstruction(index, instrArgs) { | ||
@@ -418,3 +436,7 @@ assert(typeof index.type === "string"); | ||
} | ||
/** | ||
* Decorators | ||
*/ | ||
function withLoc(n, end, start) { | ||
@@ -428,2 +450,8 @@ var loc = { | ||
} | ||
function withRaw(n, raw) { | ||
// $FlowIgnore | ||
n.raw = raw; | ||
return n; | ||
} | ||
/** | ||
@@ -615,2 +643,6 @@ * Import | ||
}; | ||
} | ||
function isAnonymous(ident) { | ||
return ident.raw === ""; | ||
} |
{ | ||
"name": "@webassemblyjs/ast", | ||
"version": "1.2.2", | ||
"version": "1.2.3", | ||
"description": "AST utils for webassemblyjs", | ||
@@ -14,5 +14,4 @@ "keywords": [ | ||
"dependencies": { | ||
"@webassemblyjs/wast-parser": "1.2.2", | ||
"webassembly-floating-point-hex-parser": "0.1.2", | ||
"webassemblyjs": "1.2.2" | ||
"@webassemblyjs/wast-parser": "1.2.3", | ||
"webassemblyjs": "1.2.3" | ||
}, | ||
@@ -19,0 +18,0 @@ "repository": { |
@@ -335,2 +335,14 @@ // @flow | ||
export function getUniqueNameGenerator(): string => string { | ||
const inc = {}; | ||
return function(prefix: string = "temp"): string { | ||
if (!(prefix in inc)) { | ||
inc[prefix] = 0; | ||
} else { | ||
inc[prefix] = inc[prefix] + 1; | ||
} | ||
return prefix + "_" + inc[prefix]; | ||
}; | ||
} | ||
export function callInstruction( | ||
@@ -375,2 +387,6 @@ index: Index, | ||
/** | ||
* Decorators | ||
*/ | ||
export function withLoc(n: Node, end: Position, start: Position): Node { | ||
@@ -387,2 +403,9 @@ const loc = { | ||
export function withRaw(n: Node, raw: string): Node { | ||
// $FlowIgnore | ||
n.raw = raw; | ||
return n; | ||
} | ||
/** | ||
@@ -611,2 +634,6 @@ * Import | ||
export function isAnonymous(ident: Identifier): boolean { | ||
return ident.raw === ""; | ||
} | ||
export { traverse, traverseWithHooks } from "./traverse"; | ||
@@ -613,0 +640,0 @@ export { signatures } from "./signatures"; |
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
65232
2
2294
+ 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/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)
Updatedwebassemblyjs@1.2.3