nav tabs on admin dashboard
This commit is contained in:
69
node_modules/regenerator-transform/lib/leap.js
generated
vendored
69
node_modules/regenerator-transform/lib/leap.js
generated
vendored
@@ -1,34 +1,28 @@
|
||||
"use strict";
|
||||
|
||||
var _assert = require("assert");
|
||||
var _assert = _interopRequireDefault(require("assert"));
|
||||
|
||||
var _assert2 = _interopRequireDefault(_assert);
|
||||
|
||||
var _babelTypes = require("babel-types");
|
||||
|
||||
var t = _interopRequireWildcard(_babelTypes);
|
||||
var _emit = require("./emit");
|
||||
|
||||
var _util = require("util");
|
||||
|
||||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
||||
var _util2 = require("./util");
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
function Entry() {
|
||||
_assert2.default.ok(this instanceof Entry);
|
||||
} /**
|
||||
* Copyright (c) 2014, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* https://raw.github.com/facebook/regenerator/master/LICENSE file. An
|
||||
* additional grant of patent rights can be found in the PATENTS file in
|
||||
* the same directory.
|
||||
*/
|
||||
_assert.default.ok(this instanceof Entry);
|
||||
}
|
||||
|
||||
function FunctionEntry(returnLoc) {
|
||||
Entry.call(this);
|
||||
t.assertLiteral(returnLoc);
|
||||
(0, _util2.getTypes)().assertLiteral(returnLoc);
|
||||
this.returnLoc = returnLoc;
|
||||
}
|
||||
|
||||
@@ -37,7 +31,7 @@ exports.FunctionEntry = FunctionEntry;
|
||||
|
||||
function LoopEntry(breakLoc, continueLoc, label) {
|
||||
Entry.call(this);
|
||||
|
||||
var t = (0, _util2.getTypes)();
|
||||
t.assertLiteral(breakLoc);
|
||||
t.assertLiteral(continueLoc);
|
||||
|
||||
@@ -57,7 +51,7 @@ exports.LoopEntry = LoopEntry;
|
||||
|
||||
function SwitchEntry(breakLoc) {
|
||||
Entry.call(this);
|
||||
t.assertLiteral(breakLoc);
|
||||
(0, _util2.getTypes)().assertLiteral(breakLoc);
|
||||
this.breakLoc = breakLoc;
|
||||
}
|
||||
|
||||
@@ -66,23 +60,23 @@ exports.SwitchEntry = SwitchEntry;
|
||||
|
||||
function TryEntry(firstLoc, catchEntry, finallyEntry) {
|
||||
Entry.call(this);
|
||||
|
||||
var t = (0, _util2.getTypes)();
|
||||
t.assertLiteral(firstLoc);
|
||||
|
||||
if (catchEntry) {
|
||||
_assert2.default.ok(catchEntry instanceof CatchEntry);
|
||||
_assert.default.ok(catchEntry instanceof CatchEntry);
|
||||
} else {
|
||||
catchEntry = null;
|
||||
}
|
||||
|
||||
if (finallyEntry) {
|
||||
_assert2.default.ok(finallyEntry instanceof FinallyEntry);
|
||||
_assert.default.ok(finallyEntry instanceof FinallyEntry);
|
||||
} else {
|
||||
finallyEntry = null;
|
||||
}
|
||||
} // Have to have one or the other (or both).
|
||||
|
||||
// Have to have one or the other (or both).
|
||||
_assert2.default.ok(catchEntry || finallyEntry);
|
||||
|
||||
_assert.default.ok(catchEntry || finallyEntry);
|
||||
|
||||
this.firstLoc = firstLoc;
|
||||
this.catchEntry = catchEntry;
|
||||
@@ -94,10 +88,9 @@ exports.TryEntry = TryEntry;
|
||||
|
||||
function CatchEntry(firstLoc, paramId) {
|
||||
Entry.call(this);
|
||||
|
||||
var t = (0, _util2.getTypes)();
|
||||
t.assertLiteral(firstLoc);
|
||||
t.assertIdentifier(paramId);
|
||||
|
||||
this.firstLoc = firstLoc;
|
||||
this.paramId = paramId;
|
||||
}
|
||||
@@ -107,6 +100,7 @@ exports.CatchEntry = CatchEntry;
|
||||
|
||||
function FinallyEntry(firstLoc, afterLoc) {
|
||||
Entry.call(this);
|
||||
var t = (0, _util2.getTypes)();
|
||||
t.assertLiteral(firstLoc);
|
||||
t.assertLiteral(afterLoc);
|
||||
this.firstLoc = firstLoc;
|
||||
@@ -118,10 +112,9 @@ exports.FinallyEntry = FinallyEntry;
|
||||
|
||||
function LabeledEntry(breakLoc, label) {
|
||||
Entry.call(this);
|
||||
|
||||
var t = (0, _util2.getTypes)();
|
||||
t.assertLiteral(breakLoc);
|
||||
t.assertIdentifier(label);
|
||||
|
||||
this.breakLoc = breakLoc;
|
||||
this.label = label;
|
||||
}
|
||||
@@ -130,10 +123,9 @@ function LabeledEntry(breakLoc, label) {
|
||||
exports.LabeledEntry = LabeledEntry;
|
||||
|
||||
function LeapManager(emitter) {
|
||||
_assert2.default.ok(this instanceof LeapManager);
|
||||
_assert.default.ok(this instanceof LeapManager);
|
||||
|
||||
var Emitter = require("./emit").Emitter;
|
||||
_assert2.default.ok(emitter instanceof Emitter);
|
||||
_assert.default.ok(emitter instanceof _emit.Emitter);
|
||||
|
||||
this.emitter = emitter;
|
||||
this.entryStack = [new FunctionEntry(emitter.finalLoc)];
|
||||
@@ -143,13 +135,16 @@ var LMp = LeapManager.prototype;
|
||||
exports.LeapManager = LeapManager;
|
||||
|
||||
LMp.withEntry = function (entry, callback) {
|
||||
_assert2.default.ok(entry instanceof Entry);
|
||||
_assert.default.ok(entry instanceof Entry);
|
||||
|
||||
this.entryStack.push(entry);
|
||||
|
||||
try {
|
||||
callback.call(this.emitter);
|
||||
} finally {
|
||||
var popped = this.entryStack.pop();
|
||||
_assert2.default.strictEqual(popped, entry);
|
||||
|
||||
_assert.default.strictEqual(popped, entry);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -157,13 +152,13 @@ LMp._findLeapLocation = function (property, label) {
|
||||
for (var i = this.entryStack.length - 1; i >= 0; --i) {
|
||||
var entry = this.entryStack[i];
|
||||
var loc = entry[property];
|
||||
|
||||
if (loc) {
|
||||
if (label) {
|
||||
if (entry.label && entry.label.name === label.name) {
|
||||
return loc;
|
||||
}
|
||||
} else if (entry instanceof LabeledEntry) {
|
||||
// Ignore LabeledEntry entries unless we are actually breaking to
|
||||
} else if (entry instanceof LabeledEntry) {// Ignore LabeledEntry entries unless we are actually breaking to
|
||||
// a label.
|
||||
} else {
|
||||
return loc;
|
||||
|
||||
Reference in New Issue
Block a user