remove asserts from babel-transform-regenerator
This commit is contained in:
@@ -321,8 +321,6 @@ Ep.getTryLocsList = function() {
|
||||
// No destructive modification of AST nodes.
|
||||
|
||||
Ep.explode = function(path, ignoreResult) {
|
||||
assert.ok(path instanceof traverse.NodePath);
|
||||
|
||||
var node = path.node;
|
||||
var self = this;
|
||||
|
||||
@@ -370,8 +368,6 @@ function getDeclError(node) {
|
||||
}
|
||||
|
||||
Ep.explodeStatement = function(path, labelId) {
|
||||
assert.ok(path instanceof traverse.NodePath);
|
||||
|
||||
var stmt = path.node;
|
||||
var self = this;
|
||||
|
||||
@@ -886,8 +882,6 @@ Ep.updateContextPrevLoc = function(loc) {
|
||||
};
|
||||
|
||||
Ep.explodeExpression = function(path, ignoreResult) {
|
||||
assert.ok(path instanceof traverse.NodePath);
|
||||
|
||||
var expr = path.node;
|
||||
if (expr) {
|
||||
t.assertExpression(expr);
|
||||
|
||||
@@ -18,7 +18,6 @@ var hasOwn = Object.prototype.hasOwnProperty;
|
||||
// returns a VariableDeclaration containing just the names of the removed
|
||||
// declarations.
|
||||
exports.hoist = function(funPath) {
|
||||
assert.ok(funPath instanceof traverse.NodePath);
|
||||
t.assertFunction(funPath.node);
|
||||
|
||||
var vars = {};
|
||||
|
||||
@@ -177,7 +177,6 @@ function getOuterFnExpr(funPath) {
|
||||
}
|
||||
|
||||
function getRuntimeMarkDecl(blockPath) {
|
||||
assert.ok(blockPath instanceof traverse.NodePath);
|
||||
var block = blockPath.node;
|
||||
assert.ok(Array.isArray(block.body));
|
||||
|
||||
@@ -206,8 +205,6 @@ function getRuntimeMarkDecl(blockPath) {
|
||||
}
|
||||
|
||||
function renameArguments(funcPath, argsId) {
|
||||
assert.ok(funcPath instanceof traverse.NodePath);
|
||||
|
||||
var state = {
|
||||
didRenameArguments: false,
|
||||
argsId: argsId
|
||||
|
||||
Reference in New Issue
Block a user