Skip newlines around inline #__PURE__ annotations (#11133)

* Skip newlines around #__PURE__ annotations

* Update tests
This commit is contained in:
Nicolò Ribaudo 2020-02-13 19:16:33 +01:00 committed by GitHub
parent 3c6a8ae200
commit d21e2217d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
274 changed files with 382 additions and 1072 deletions

View File

@ -1,6 +1,4 @@
var Foo =
/*#__PURE__*/
function (_Bar) {
var Foo = /*#__PURE__*/function (_Bar) {
"use strict";
babelHelpers.inherits(Foo, _Bar);

View File

@ -1,9 +1,7 @@
function f() {
var _this = this;
let g =
/*#__PURE__*/
function () {
let g = /*#__PURE__*/function () {
var _ref = babelHelpers.asyncToGenerator(function* () {
_this;
});
@ -19,9 +17,7 @@ class Class {
var _this2 = this;
return babelHelpers.asyncToGenerator(function* () {
var c =
/*#__PURE__*/
function () {
var c = /*#__PURE__*/function () {
var _ref2 = babelHelpers.asyncToGenerator(function* (b) {
_this2;
});

View File

@ -15,9 +15,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
var Foo =
/*#__PURE__*/
function () {
var Foo = /*#__PURE__*/function () {
function Foo() {
_classCallCheck(this, Foo);
}
@ -25,9 +23,7 @@ function () {
_createClass(Foo, [{
key: "bar",
value: function () {
var _bar = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee() {
var _bar = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
var baz;
return regeneratorRuntime.wrap(function _callee$(_context) {
while (1) {
@ -61,9 +57,7 @@ function foo() {
}
function _foo() {
_foo = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee3() {
_foo = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
var bar, _bar2;
return regeneratorRuntime.wrap(function _callee3$(_context3) {
@ -71,9 +65,7 @@ function _foo() {
switch (_context3.prev = _context3.next) {
case 0:
_bar2 = function _ref2() {
_bar2 = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee2() {
_bar2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
var baz;
return regeneratorRuntime.wrap(function _callee2$(_context2) {
while (1) {

View File

@ -1,6 +1,4 @@
var Test =
/*#__PURE__*/
function () {
var Test = /*#__PURE__*/function () {
"use strict";
function Test() {

View File

@ -4,7 +4,7 @@
"column": 10
},
"generated": {
"line": 13,
"line": 11,
"column": 15
}
}]

View File

@ -9,6 +9,7 @@ import * as generatorFunctions from "./generators";
const SCIENTIFIC_NOTATION = /e/i;
const ZERO_DECIMAL_INTEGER = /\.0+$/;
const NON_DECIMAL_LITERAL = /^0[box]/;
const PURE_ANNOTATION_RE = /^\s*[@#]__PURE__\s*$/;
export type Format = {
shouldPrintComment: (comment: string) => boolean,
@ -477,7 +478,11 @@ export default class Printer {
}
_printLeadingComments(node) {
this._printComments(this._getComments(true, node));
this._printComments(
this._getComments(true, node),
// Don't add leading/trailing new lines to #__PURE__ annotations
true,
);
}
printInnerComments(node, indent = true) {
@ -532,7 +537,7 @@ export default class Printer {
);
}
_printComment(comment) {
_printComment(comment, skipNewLines?: boolean) {
if (!this.format.shouldPrintComment(comment.value)) return;
// Some plugins use this to mark comments as removed using the AST-root 'comments' property,
@ -549,12 +554,12 @@ export default class Printer {
const isBlockComment = comment.type === "CommentBlock";
// Always add a newline before a block comment
this.newline(
this._buf.hasContent() && !this._noLineTerminator && isBlockComment
? 1
: 0,
);
// Add a newline before and after a block comment, unless explicitly
// disallowed
const printNewLines =
isBlockComment && !skipNewLines && !this._noLineTerminator;
if (printNewLines && this._buf.hasContent()) this.newline(1);
if (!this.endsWith("[") && !this.endsWith("{")) this.space();
@ -584,15 +589,26 @@ export default class Printer {
this._append(val);
});
// Always add a newline after a block comment
this.newline(isBlockComment && !this._noLineTerminator ? 1 : 0);
if (printNewLines) this.newline(1);
}
_printComments(comments?: Array<Object>) {
_printComments(comments?: Array<Object>, inlinePureAnnotation?: boolean) {
if (!comments || !comments.length) return;
for (const comment of comments) {
this._printComment(comment);
if (
inlinePureAnnotation &&
comments.length === 1 &&
PURE_ANNOTATION_RE.test(comments[0].value)
) {
this._printComment(
comments[0],
// Keep newlines if the comment marks a standalone call
this._buf.hasContent() && !this.endsWith("\n"),
);
} else {
for (const comment of comments) {
this._printComment(comment);
}
}
}
}

View File

@ -1,8 +1,6 @@
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
let Foo =
/*#__PURE__*/
function () {
let Foo = /*#__PURE__*/function () {
"use strict";
function Foo() {

View File

@ -3,9 +3,7 @@ function g() {
}
function _g() {
_g = babelHelpers.wrapAsyncGenerator(function* (x =
/*#__PURE__*/
babelHelpers.asyncToGenerator(function* () {
_g = babelHelpers.wrapAsyncGenerator(function* (x = /*#__PURE__*/babelHelpers.asyncToGenerator(function* () {
yield 1;
})) {
yield babelHelpers.awaitAsyncGenerator(2);

View File

@ -10,9 +10,7 @@ let Hello = function Hello() {
};
};
let Outer =
/*#__PURE__*/
function (_Hello) {
let Outer = /*#__PURE__*/function (_Hello) {
babelHelpers.inherits(Outer, _Hello);
function Outer() {

View File

@ -1,8 +1,6 @@
"use strict";
let Hello =
/*#__PURE__*/
function () {
let Hello = /*#__PURE__*/function () {
function Hello() {
babelHelpers.classCallCheck(this, Hello);
}
@ -16,9 +14,7 @@ function () {
return Hello;
}();
let Outer =
/*#__PURE__*/
function (_Hello) {
let Outer = /*#__PURE__*/function (_Hello) {
babelHelpers.inherits(Outer, _Hello);
function Outer() {

View File

@ -1,6 +1,4 @@
var Foo =
/*#__PURE__*/
function () {
var Foo = /*#__PURE__*/function () {
"use strict";
function Foo() {

View File

@ -1,6 +1,4 @@
var Foo =
/*#__PURE__*/
function () {
var Foo = /*#__PURE__*/function () {
"use strict";
function Foo() {

View File

@ -1,6 +1,4 @@
var Point =
/*#__PURE__*/
function () {
var Point = /*#__PURE__*/function () {
"use strict";
function Point(x = 0, y = 0) {

View File

@ -1,6 +1,4 @@
var Foo =
/*#__PURE__*/
function (_Bar) {
var Foo = /*#__PURE__*/function (_Bar) {
"use strict";
babelHelpers.inherits(Foo, _Bar);

View File

@ -10,9 +10,7 @@ var Foo = function Foo() {
var _prop = babelHelpers.classPrivateFieldLooseKey("prop");
var Bar =
/*#__PURE__*/
function (_Foo) {
var Bar = /*#__PURE__*/function (_Foo) {
"use strict";
babelHelpers.inherits(Bar, _Foo);

View File

@ -1,6 +1,4 @@
var Child =
/*#__PURE__*/
function (_Parent) {
var Child = /*#__PURE__*/function (_Parent) {
"use strict";
babelHelpers.inherits(Child, _Parent);

View File

@ -7,9 +7,7 @@ var Outer = function Outer() {
value: void 0
});
var Test =
/*#__PURE__*/
function (_babelHelpers$classPr) {
var Test = /*#__PURE__*/function (_babelHelpers$classPr) {
babelHelpers.inherits(Test, _babelHelpers$classPr);
function Test() {

View File

@ -1,6 +1,4 @@
var Foo =
/*#__PURE__*/
function () {
var Foo = /*#__PURE__*/function () {
"use strict";
function Foo() {

View File

@ -1,6 +1,4 @@
var Foo =
/*#__PURE__*/
function (_Bar) {
var Foo = /*#__PURE__*/function (_Bar) {
"use strict";
babelHelpers.inherits(Foo, _Bar);

View File

@ -1,6 +1,4 @@
var Foo =
/*#__PURE__*/
function (_Bar) {
var Foo = /*#__PURE__*/function (_Bar) {
"use strict";
babelHelpers.inherits(Foo, _Bar);

View File

@ -1,6 +1,4 @@
var Foo =
/*#__PURE__*/
function () {
var Foo = /*#__PURE__*/function () {
"use strict";
function Foo() {

View File

@ -1,6 +1,4 @@
var Foo =
/*#__PURE__*/
function () {
var Foo = /*#__PURE__*/function () {
"use strict";
function Foo() {

View File

@ -1,6 +1,4 @@
var Foo =
/*#__PURE__*/
function () {
var Foo = /*#__PURE__*/function () {
"use strict";
function Foo() {

View File

@ -1,6 +1,4 @@
var Point =
/*#__PURE__*/
function () {
var Point = /*#__PURE__*/function () {
"use strict";
function Point(x = 0, y = 0) {

View File

@ -1,6 +1,4 @@
var Foo =
/*#__PURE__*/
function (_Bar) {
var Foo = /*#__PURE__*/function (_Bar) {
"use strict";
babelHelpers.inherits(Foo, _Bar);

View File

@ -11,9 +11,7 @@ var Foo = function Foo() {
var _prop = new WeakMap();
var Bar =
/*#__PURE__*/
function (_Foo) {
var Bar = /*#__PURE__*/function (_Foo) {
"use strict";
babelHelpers.inherits(Bar, _Foo);

View File

@ -1,6 +1,4 @@
var Child =
/*#__PURE__*/
function (_Parent) {
var Child = /*#__PURE__*/function (_Parent) {
"use strict";
babelHelpers.inherits(Child, _Parent);

View File

@ -8,9 +8,7 @@ var Outer = function Outer() {
value: void 0
});
var Test =
/*#__PURE__*/
function (_babelHelpers$classPr) {
var Test = /*#__PURE__*/function (_babelHelpers$classPr) {
babelHelpers.inherits(Test, _babelHelpers$classPr);
function Test() {

View File

@ -1,6 +1,4 @@
var Foo =
/*#__PURE__*/
function () {
var Foo = /*#__PURE__*/function () {
"use strict";
function Foo() {

View File

@ -1,6 +1,4 @@
var A =
/*#__PURE__*/
function () {
var A = /*#__PURE__*/function () {
"use strict";
function A() {
@ -16,9 +14,7 @@ function () {
return A;
}();
var B =
/*#__PURE__*/
function (_A) {
var B = /*#__PURE__*/function (_A) {
"use strict";
babelHelpers.inherits(B, _A);

View File

@ -1,6 +1,4 @@
var Foo =
/*#__PURE__*/
function (_Bar) {
var Foo = /*#__PURE__*/function (_Bar) {
"use strict";
babelHelpers.inherits(Foo, _Bar);

View File

@ -1,6 +1,4 @@
var Foo =
/*#__PURE__*/
function (_Bar) {
var Foo = /*#__PURE__*/function (_Bar) {
"use strict";
babelHelpers.inherits(Foo, _Bar);

View File

@ -1,6 +1,4 @@
var Foo =
/*#__PURE__*/
function () {
var Foo = /*#__PURE__*/function () {
"use strict";
function Foo() {

View File

@ -15,9 +15,7 @@ _ref3 = /regex/;
_baz = baz;
_ref4 = `template${expression}`;
var MyClass =
/*#__PURE__*/
function () {
var MyClass = /*#__PURE__*/function () {
"use strict";
function MyClass() {

View File

@ -1,6 +1,4 @@
var Foo =
/*#__PURE__*/
function (_Bar) {
var Foo = /*#__PURE__*/function (_Bar) {
"use strict";
babelHelpers.inherits(Foo, _Bar);

View File

@ -1,6 +1,4 @@
var Child =
/*#__PURE__*/
function (_Parent) {
var Child = /*#__PURE__*/function (_Parent) {
"use strict";
babelHelpers.inherits(Child, _Parent);

View File

@ -1,9 +1,7 @@
export default (param => {
var _class, _temp;
return _temp = _class =
/*#__PURE__*/
function () {
return _temp = _class = /*#__PURE__*/function () {
function App() {
babelHelpers.classCallCheck(this, App);
}

View File

@ -1,9 +1,7 @@
function withContext(ComposedComponent) {
var _class, _temp;
return _temp = _class =
/*#__PURE__*/
function (_Component) {
return _temp = _class = /*#__PURE__*/function (_Component) {
"use strict";
babelHelpers.inherits(WithContext, _Component);

View File

@ -2,9 +2,7 @@ class MyClass {
constructor() {
var _this = this;
this.myAsyncMethod =
/*#__PURE__*/
babelHelpers.asyncToGenerator(function* () {
this.myAsyncMethod = /*#__PURE__*/babelHelpers.asyncToGenerator(function* () {
console.log(_this);
});
}
@ -15,9 +13,7 @@ class MyClass {
constructor() {
var _this2 = this;
this.myAsyncMethod =
/*#__PURE__*/
babelHelpers.asyncToGenerator(function* () {
this.myAsyncMethod = /*#__PURE__*/babelHelpers.asyncToGenerator(function* () {
console.log(_this2);
});
}
@ -28,9 +24,7 @@ export default class MyClass3 {
constructor() {
var _this3 = this;
this.myAsyncMethod =
/*#__PURE__*/
babelHelpers.asyncToGenerator(function* () {
this.myAsyncMethod = /*#__PURE__*/babelHelpers.asyncToGenerator(function* () {
console.log(_this3);
});
}

View File

@ -6,9 +6,7 @@ var A = function A() {
A.prop = 1;
var B =
/*#__PURE__*/
function (_A) {
var B = /*#__PURE__*/function (_A) {
"use strict";
babelHelpers.inherits(B, _A);

View File

@ -1,6 +1,4 @@
var A =
/*#__PURE__*/
function () {
var A = /*#__PURE__*/function () {
"use strict";
function A() {
@ -16,9 +14,7 @@ function () {
return A;
}();
var B =
/*#__PURE__*/
function (_A) {
var B = /*#__PURE__*/function (_A) {
"use strict";
babelHelpers.inherits(B, _A);

View File

@ -1,6 +1,4 @@
var Foo =
/*#__PURE__*/
function (_Bar) {
var Foo = /*#__PURE__*/function (_Bar) {
"use strict";
babelHelpers.inherits(Foo, _Bar);

View File

@ -1,6 +1,4 @@
var Foo =
/*#__PURE__*/
function (_Bar) {
var Foo = /*#__PURE__*/function (_Bar) {
"use strict";
babelHelpers.inherits(Foo, _Bar);

View File

@ -1,6 +1,4 @@
var Foo =
/*#__PURE__*/
function () {
var Foo = /*#__PURE__*/function () {
"use strict";
function Foo() {

View File

@ -1,6 +1,4 @@
var Foo =
/*#__PURE__*/
function () {
var Foo = /*#__PURE__*/function () {
"use strict";
function Foo() {

View File

@ -3,9 +3,7 @@ var createClass = k => {
var _k;
return _temp = (_k = k(),
/*#__PURE__*/
function () {
return _temp = (_k = k(), /*#__PURE__*/function () {
"use strict";
function _class2() {

View File

@ -15,9 +15,7 @@ _ref3 = /regex/;
_baz = baz;
_ref4 = `template${expression}`;
var MyClass =
/*#__PURE__*/
function () {
var MyClass = /*#__PURE__*/function () {
"use strict";
function MyClass() {

View File

@ -1,6 +1,4 @@
var Foo =
/*#__PURE__*/
function (_Bar) {
var Foo = /*#__PURE__*/function (_Bar) {
"use strict";
babelHelpers.inherits(Foo, _Bar);

View File

@ -1,6 +1,4 @@
var Foo =
/*#__PURE__*/
function (_Bar) {
var Foo = /*#__PURE__*/function (_Bar) {
"use strict";
babelHelpers.inherits(Foo, _Bar);

View File

@ -1,6 +1,4 @@
var Child =
/*#__PURE__*/
function (_Parent) {
var Child = /*#__PURE__*/function (_Parent) {
"use strict";
babelHelpers.inherits(Child, _Parent);

View File

@ -1,9 +1,7 @@
export default (param => {
var _class, _temp;
return _temp = _class =
/*#__PURE__*/
function () {
return _temp = _class = /*#__PURE__*/function () {
function App() {
babelHelpers.classCallCheck(this, App);
}

View File

@ -1,9 +1,7 @@
function withContext(ComposedComponent) {
var _class, _temp;
return _temp = _class =
/*#__PURE__*/
function (_Component) {
return _temp = _class = /*#__PURE__*/function (_Component) {
"use strict";
babelHelpers.inherits(WithContext, _Component);

View File

@ -2,9 +2,7 @@ class MyClass {
constructor() {
var _this = this;
babelHelpers.defineProperty(this, "myAsyncMethod",
/*#__PURE__*/
babelHelpers.asyncToGenerator(function* () {
babelHelpers.defineProperty(this, "myAsyncMethod", /*#__PURE__*/babelHelpers.asyncToGenerator(function* () {
console.log(_this);
}));
}
@ -15,9 +13,7 @@ class MyClass {
constructor() {
var _this2 = this;
babelHelpers.defineProperty(this, "myAsyncMethod",
/*#__PURE__*/
babelHelpers.asyncToGenerator(function* () {
babelHelpers.defineProperty(this, "myAsyncMethod", /*#__PURE__*/babelHelpers.asyncToGenerator(function* () {
console.log(_this2);
}));
}
@ -28,9 +24,7 @@ export default class MyClass3 {
constructor() {
var _this3 = this;
babelHelpers.defineProperty(this, "myAsyncMethod",
/*#__PURE__*/
babelHelpers.asyncToGenerator(function* () {
babelHelpers.defineProperty(this, "myAsyncMethod", /*#__PURE__*/babelHelpers.asyncToGenerator(function* () {
console.log(_this3);
}));
}

View File

@ -6,9 +6,7 @@ var A = function A() {
babelHelpers.defineProperty(A, "prop", 1);
var B =
/*#__PURE__*/
function (_A) {
var B = /*#__PURE__*/function (_A) {
"use strict";
babelHelpers.inherits(B, _A);

View File

@ -1,6 +1,4 @@
var A =
/*#__PURE__*/
function () {
var A = /*#__PURE__*/function () {
"use strict";
function A() {
@ -16,9 +14,7 @@ function () {
return A;
}();
var B =
/*#__PURE__*/
function (_A) {
var B = /*#__PURE__*/function (_A) {
"use strict";
babelHelpers.inherits(B, _A);

View File

@ -1,6 +1,4 @@
var Foo =
/*#__PURE__*/
function (_Bar) {
var Foo = /*#__PURE__*/function (_Bar) {
"use strict";
babelHelpers.inherits(Foo, _Bar);

View File

@ -1,6 +1,4 @@
var Foo =
/*#__PURE__*/
function (_Bar) {
var Foo = /*#__PURE__*/function (_Bar) {
"use strict";
babelHelpers.inherits(Foo, _Bar);

View File

@ -1,6 +1,4 @@
var Foo =
/*#__PURE__*/
function () {
var Foo = /*#__PURE__*/function () {
"use strict";
function Foo() {

View File

@ -23,9 +23,7 @@ var Test = function Test() {
_classCallCheck(this, Test);
var Other =
/*#__PURE__*/
function (_Test) {
var Other = /*#__PURE__*/function (_Test) {
_inherits(Other, _Test);
function Other() {

View File

@ -1,9 +1,7 @@
function withContext(ComposedComponent) {
var _class, _temp;
return _temp = _class =
/*#__PURE__*/
function (_Component) {
return _temp = _class = /*#__PURE__*/function (_Component) {
"use strict";
babelHelpers.inherits(WithContext, _Component);

View File

@ -2,9 +2,7 @@ class MyClass {
constructor() {
var _this = this;
this.myAsyncMethod =
/*#__PURE__*/
babelHelpers.asyncToGenerator(function* () {
this.myAsyncMethod = /*#__PURE__*/babelHelpers.asyncToGenerator(function* () {
console.log(_this);
});
}
@ -15,9 +13,7 @@ class MyClass {
constructor() {
var _this2 = this;
this.myAsyncMethod =
/*#__PURE__*/
babelHelpers.asyncToGenerator(function* () {
this.myAsyncMethod = /*#__PURE__*/babelHelpers.asyncToGenerator(function* () {
console.log(_this2);
});
}
@ -28,9 +24,7 @@ export default class MyClass3 {
constructor() {
var _this3 = this;
this.myAsyncMethod =
/*#__PURE__*/
babelHelpers.asyncToGenerator(function* () {
this.myAsyncMethod = /*#__PURE__*/babelHelpers.asyncToGenerator(function* () {
console.log(_this3);
});
}

View File

@ -16,9 +16,7 @@ function _initializerWarningHelper(descriptor, context) { throw new Error('Decor
function dec() {}
let A = (_class = (_temp = (_Symbol$search = Symbol.search,
/*#__PURE__*/
function () {
let A = (_class = (_temp = (_Symbol$search = Symbol.search, /*#__PURE__*/function () {
"use strict";
function A() {

View File

@ -25,9 +25,7 @@ function generateAsyncAction(type) {
return request;
}
var A =
/*#__PURE__*/
function (_B) {
var A = /*#__PURE__*/function (_B) {
"use strict";
_inherits(A, _B);

View File

@ -8,9 +8,7 @@ function _one() {}
function _two() {}
let Test1 =
/*#__PURE__*/
function () {
let Test1 = /*#__PURE__*/function () {
"use strict";
function Test1() {

View File

@ -4,9 +4,7 @@ let TestClass = {
testMethodFailure() {
var _this = this;
return new Promise(
/*#__PURE__*/
function () {
return new Promise( /*#__PURE__*/function () {
var _ref = babelHelpers.asyncToGenerator(function* (resolve) {
console.log(_this);
setTimeout(resolve, 1000);

View File

@ -1,8 +1,6 @@
var _this = this;
babelHelpers.asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee() {
babelHelpers.asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
return regeneratorRuntime.wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
@ -15,9 +13,7 @@ regeneratorRuntime.mark(function _callee() {
}
}, _callee);
}))();
babelHelpers.asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee2() {
babelHelpers.asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
return regeneratorRuntime.wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
@ -34,9 +30,7 @@ regeneratorRuntime.mark(function _callee2() {
/*#__PURE__*/
(function () {
var _notIIFE = babelHelpers.asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee3() {
var _notIIFE = babelHelpers.asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
return regeneratorRuntime.wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
@ -58,9 +52,7 @@ regeneratorRuntime.mark(function _callee2() {
})();
/*#__PURE__*/
babelHelpers.asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee4() {
babelHelpers.asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {
return regeneratorRuntime.wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:

View File

@ -1,6 +1,4 @@
babelHelpers.asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee() {
babelHelpers.asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
return regeneratorRuntime.wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
@ -13,9 +11,7 @@ regeneratorRuntime.mark(function _callee() {
}
}, _callee);
}))();
babelHelpers.asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee2() {
babelHelpers.asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
return regeneratorRuntime.wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
@ -31,9 +27,7 @@ regeneratorRuntime.mark(function _callee2() {
/*#__PURE__*/
(function () {
var _notIIFE = babelHelpers.asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee3() {
var _notIIFE = babelHelpers.asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
return regeneratorRuntime.wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
@ -55,9 +49,7 @@ regeneratorRuntime.mark(function _callee2() {
})();
/*#__PURE__*/
babelHelpers.asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee4() {
babelHelpers.asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {
return regeneratorRuntime.wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:

View File

@ -11,13 +11,9 @@ function _s() {
args[_key - 1] = arguments[_key];
}
let t =
/*#__PURE__*/
function () {
let t = /*#__PURE__*/function () {
var _ref = babelHelpers.asyncToGenerator(function* (y, a) {
let r =
/*#__PURE__*/
function () {
let r = /*#__PURE__*/function () {
var _ref2 = babelHelpers.asyncToGenerator(function* (z, b) {
yield z;

View File

@ -1,6 +1,4 @@
var foo =
/*#__PURE__*/
function () {
var foo = /*#__PURE__*/function () {
var _ref = babelHelpers.asyncToGenerator(function* () {
var wat = yield bar();
});
@ -10,9 +8,7 @@ function () {
};
}();
var foo2 =
/*#__PURE__*/
function () {
var foo2 = /*#__PURE__*/function () {
var _ref2 = babelHelpers.asyncToGenerator(function* () {
var wat = yield bar();
});
@ -21,9 +17,7 @@ function () {
return _ref2.apply(this, arguments);
};
}(),
bar =
/*#__PURE__*/
function () {
bar = /*#__PURE__*/function () {
var _ref3 = babelHelpers.asyncToGenerator(function* () {
var wat = yield foo();
});

View File

@ -1,6 +1,4 @@
var foo =
/*#__PURE__*/
function () {
var foo = /*#__PURE__*/function () {
var _bar = babelHelpers.asyncToGenerator(function* () {
console.log(bar);
});

View File

@ -1,3 +1 @@
foo(
/*#__PURE__*/
babelHelpers.asyncToGenerator(function* () {}));
foo( /*#__PURE__*/babelHelpers.asyncToGenerator(function* () {}));

View File

@ -1,8 +1,6 @@
var _coroutine = require("bluebird").coroutine;
var foo =
/*#__PURE__*/
function () {
var foo = /*#__PURE__*/function () {
var _ref = _coroutine(function* () {
var wat = yield bar();
});

View File

@ -1,8 +1,6 @@
var _coroutine = require("bluebird").coroutine;
var foo =
/*#__PURE__*/
function () {
var foo = /*#__PURE__*/function () {
var _bar = _coroutine(function* () {
console.log(bar);
});

View File

@ -5,9 +5,7 @@ Object.defineProperty(exports, "__esModule", {
});
exports.default = void 0;
var _default =
/*#__PURE__*/
babelHelpers.asyncToGenerator(function* () {
var _default = /*#__PURE__*/babelHelpers.asyncToGenerator(function* () {
return yield foo();
});

View File

@ -4,9 +4,7 @@ function action() {
return _action.apply(this, arguments);
}
var _ref =
/*#__PURE__*/
React.createElement(Contact, {
var _ref = /*#__PURE__*/React.createElement(Contact, {
title: title
});

View File

@ -4,9 +4,7 @@ class Test {
return babelHelpers.asyncToGenerator(function* () {
console.log(_this);
setTimeout(
/*#__PURE__*/
babelHelpers.asyncToGenerator(function* () {
setTimeout( /*#__PURE__*/babelHelpers.asyncToGenerator(function* () {
console.log(_this);
}));
})();
@ -17,9 +15,7 @@ class Test {
return babelHelpers.asyncToGenerator(function* () {
console.log(_this2);
setTimeout(
/*#__PURE__*/
function () {
setTimeout( /*#__PURE__*/function () {
var _ref2 = babelHelpers.asyncToGenerator(function* (arg) {
console.log(_this2);
});
@ -36,9 +32,7 @@ class Test {
return babelHelpers.asyncToGenerator(function* () {
console.log(_this3);
setTimeout(
/*#__PURE__*/
babelHelpers.asyncToGenerator(function* () {
setTimeout( /*#__PURE__*/babelHelpers.asyncToGenerator(function* () {
console.log(_this3);
}));
})();
@ -49,9 +43,7 @@ class Test {
return babelHelpers.asyncToGenerator(function* () {
console.log(_this4);
setTimeout(
/*#__PURE__*/
function () {
setTimeout( /*#__PURE__*/function () {
var _ref4 = babelHelpers.asyncToGenerator(function* (arg) {
console.log(_this4);
});

View File

@ -1,7 +1,5 @@
function f() {
g(
/*#__PURE__*/
babelHelpers.asyncToGenerator(function* () {
g( /*#__PURE__*/babelHelpers.asyncToGenerator(function* () {
var _this = this;
c(function () {

View File

@ -3,17 +3,13 @@ function foo() {
}
function _foo() {
_foo = babelHelpers.asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee2() {
_foo = babelHelpers.asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
return regeneratorRuntime.wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
/*#__PURE__*/
(function () {
var _ref = babelHelpers.asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee(number) {
var _ref = babelHelpers.asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(number) {
var tmp;
return regeneratorRuntime.wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {

View File

@ -12,9 +12,7 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
var List =
/*#__PURE__*/
function (_Array) {
var List = /*#__PURE__*/function (_Array) {
"use strict";
_inheritsLoose(List, _Array);

View File

@ -4,9 +4,7 @@ let Array = function Array() {
babelHelpers.classCallCheck(this, Array);
};
let List =
/*#__PURE__*/
function (_Array) {
let List = /*#__PURE__*/function (_Array) {
"use strict";
babelHelpers.inherits(List, _Array);

View File

@ -18,9 +18,7 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
var List =
/*#__PURE__*/
function (_Array) {
var List = /*#__PURE__*/function (_Array) {
"use strict";
_inherits(List, _Array);

View File

@ -2,9 +2,7 @@
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
let Base =
/*#__PURE__*/
function () {
let Base = /*#__PURE__*/function () {
function Base() {}
var _proto = Base.prototype;
@ -18,9 +16,7 @@ function () {
return Base;
}();
let Obj =
/*#__PURE__*/
function (_Base) {
let Obj = /*#__PURE__*/function (_Base) {
_inheritsLoose(Obj, _Base);
function Obj() {

View File

@ -6,9 +6,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
let Base =
/*#__PURE__*/
function () {
let Base = /*#__PURE__*/function () {
function Base() {}
_createClass(Base, [{
@ -28,9 +26,7 @@ function () {
return Base;
}();
let Obj =
/*#__PURE__*/
function (_Base) {
let Obj = /*#__PURE__*/function (_Base) {
_inheritsLoose(Obj, _Base);
function Obj() {

View File

@ -4,9 +4,7 @@ function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.crea
let Base = function Base() {};
let Obj =
/*#__PURE__*/
function (_Base) {
let Obj = /*#__PURE__*/function (_Base) {
_inheritsLoose(Obj, _Base);
function Obj() {

View File

@ -6,9 +6,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
let Base =
/*#__PURE__*/
function () {
let Base = /*#__PURE__*/function () {
function Base() {}
_createClass(Base, [{
@ -21,9 +19,7 @@ function () {
return Base;
}();
let Obj =
/*#__PURE__*/
function (_Base) {
let Obj = /*#__PURE__*/function (_Base) {
_inheritsLoose(Obj, _Base);
function Obj() {

View File

@ -6,9 +6,7 @@ let Base = function Base() {};
Base.prototype.test = 1;
let Obj =
/*#__PURE__*/
function (_Base) {
let Obj = /*#__PURE__*/function (_Base) {
_inheritsLoose(Obj, _Base);
function Obj() {

View File

@ -6,9 +6,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
let Base =
/*#__PURE__*/
function () {
let Base = /*#__PURE__*/function () {
function Base() {}
_createClass(Base, [{
@ -24,9 +22,7 @@ function () {
return Base;
}();
let Obj =
/*#__PURE__*/
function (_Base) {
let Obj = /*#__PURE__*/function (_Base) {
_inheritsLoose(Obj, _Base);
function Obj() {

View File

@ -4,9 +4,7 @@ function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.crea
let Base = function Base() {};
let Obj =
/*#__PURE__*/
function (_Base) {
let Obj = /*#__PURE__*/function (_Base) {
_inheritsLoose(Obj, _Base);
function Obj() {

View File

@ -6,9 +6,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
let Base =
/*#__PURE__*/
function () {
let Base = /*#__PURE__*/function () {
function Base() {}
_createClass(Base, [{
@ -21,9 +19,7 @@ function () {
return Base;
}();
let Obj =
/*#__PURE__*/
function (_Base) {
let Obj = /*#__PURE__*/function (_Base) {
_inheritsLoose(Obj, _Base);
function Obj() {

View File

@ -22,9 +22,7 @@ const proper = {
};
let Obj =
/*#__PURE__*/
function (_Base) {
let Obj = /*#__PURE__*/function (_Base) {
_inheritsLoose(Obj, _Base);
function Obj() {

View File

@ -22,9 +22,7 @@ const proper = {
};
let Obj =
/*#__PURE__*/
function (_Base) {
let Obj = /*#__PURE__*/function (_Base) {
_inheritsLoose(Obj, _Base);
function Obj() {

View File

@ -10,9 +10,7 @@ Object.defineProperty(Base.prototype, 'test', {
configurable: true
});
let Obj =
/*#__PURE__*/
function (_Base) {
let Obj = /*#__PURE__*/function (_Base) {
_inheritsLoose(Obj, _Base);
function Obj() {

View File

@ -8,9 +8,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
let called = false;
let Base =
/*#__PURE__*/
function () {
let Base = /*#__PURE__*/function () {
function Base() {}
_createClass(Base, [{
@ -26,9 +24,7 @@ function () {
;
let Obj =
/*#__PURE__*/
function (_Base) {
let Obj = /*#__PURE__*/function (_Base) {
_inheritsLoose(Obj, _Base);
function Obj() {

View File

@ -4,9 +4,7 @@ function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.crea
let Base = function Base() {};
let Obj =
/*#__PURE__*/
function (_Base) {
let Obj = /*#__PURE__*/function (_Base) {
_inheritsLoose(Obj, _Base);
function Obj() {

View File

@ -10,9 +10,7 @@ let Base = function Base() {};
let called = false;
let Obj =
/*#__PURE__*/
function (_Base) {
let Obj = /*#__PURE__*/function (_Base) {
_inheritsLoose(Obj, _Base);
function Obj() {

View File

@ -4,9 +4,7 @@ function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.crea
let Base = function Base() {};
let Obj =
/*#__PURE__*/
function (_Base) {
let Obj = /*#__PURE__*/function (_Base) {
_inheritsLoose(Obj, _Base);
function Obj() {

View File

@ -10,9 +10,7 @@ let Base = function Base() {};
let value = 2;
let Obj =
/*#__PURE__*/
function (_Base) {
let Obj = /*#__PURE__*/function (_Base) {
_inheritsLoose(Obj, _Base);
function Obj() {

View File

@ -8,9 +8,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
let value = 1;
let Base =
/*#__PURE__*/
function () {
let Base = /*#__PURE__*/function () {
function Base() {}
_createClass(Base, [{
@ -23,9 +21,7 @@ function () {
return Base;
}();
let Obj =
/*#__PURE__*/
function (_Base) {
let Obj = /*#__PURE__*/function (_Base) {
_inheritsLoose(Obj, _Base);
function Obj() {

View File

@ -20,9 +20,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
let Base =
/*#__PURE__*/
function () {
let Base = /*#__PURE__*/function () {
function Base() {
_classCallCheck(this, Base);
}
@ -39,9 +37,7 @@ function () {
return Base;
}();
let Obj =
/*#__PURE__*/
function (_Base) {
let Obj = /*#__PURE__*/function (_Base) {
_inherits(Obj, _Base);
function Obj() {

View File

@ -20,9 +20,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
let Base =
/*#__PURE__*/
function () {
let Base = /*#__PURE__*/function () {
function Base() {
_classCallCheck(this, Base);
}
@ -42,9 +40,7 @@ function () {
return Base;
}();
let Obj =
/*#__PURE__*/
function (_Base) {
let Obj = /*#__PURE__*/function (_Base) {
_inherits(Obj, _Base);
function Obj() {

Some files were not shown because too many files have changed in this diff Show More