Hardcode to double quotes, indent to 2 spaces (#5824)

This commit is contained in:
Henry Zhu 2017-06-05 23:14:37 -04:00 committed by Brian Ng
parent b0524427c1
commit 123dce5fcd
46 changed files with 276 additions and 322 deletions

View File

@ -13,7 +13,6 @@
"dependencies": {
"babel-messages": "7.0.0-alpha.12",
"babel-types": "7.0.0-alpha.12",
"detect-indent": "^4.0.0",
"jsesc": "^1.3.0",
"lodash": "^4.2.0",
"source-map": "^0.5.0",

View File

@ -1,4 +1,3 @@
import detectIndent from "detect-indent";
import SourceMap from "./source-map";
import * as messages from "babel-messages";
import Printer from "./printer";
@ -12,7 +11,7 @@ import type { Format } from "./printer";
class Generator extends Printer {
constructor(ast, opts = {}, code) {
const tokens = ast.tokens || [];
const format = normalizeOptions(code, opts, tokens);
const format = normalizeOptions(code, opts);
const map = opts.sourceMaps ? new SourceMap(opts, code) : null;
super(format, map, tokens);
@ -39,13 +38,7 @@ class Generator extends Printer {
* - If `opts.compact = "auto"` and the code is over 500KB, `compact` will be set to `true`.
*/
function normalizeOptions(code, opts, tokens): Format {
let style = " ";
if (code && typeof code === "string") {
const indent = detectIndent(code).indent;
if (indent && indent !== " ") style = indent;
}
function normalizeOptions(code, opts): Format {
const format = {
auxiliaryCommentBefore: opts.auxiliaryCommentBefore,
auxiliaryCommentAfter: opts.auxiliaryCommentAfter,
@ -56,11 +49,11 @@ function normalizeOptions(code, opts, tokens): Format {
compact: opts.compact,
minified: opts.minified,
concise: opts.concise,
quotes: findCommonStringDelimiter(code, tokens),
quotes: "double",
jsonCompatibleStrings: opts.jsonCompatibleStrings,
indent: {
adjustMultilineComment: true,
style: style,
style: " ",
base: 0,
},
};
@ -89,43 +82,6 @@ function normalizeOptions(code, opts, tokens): Format {
return format;
}
/**
* Determine if input code uses more single or double quotes.
*/
function findCommonStringDelimiter(code, tokens) {
const DEFAULT_STRING_DELIMITER = "double";
if (!code) {
return DEFAULT_STRING_DELIMITER;
}
const occurences = {
single: 0,
double: 0,
};
let checked = 0;
for (let i = 0; i < tokens.length; i++) {
const token = tokens[i];
if (token.type.label !== "string") continue;
const raw = code.slice(token.start, token.end);
if (raw[0] === "'") {
occurences.single++;
} else {
occurences.double++;
}
checked++;
if (checked >= 3) break;
}
if (occurences.single > occurences.double) {
return "single";
} else {
return "double";
}
}
/**
* We originally exported the Generator class above, but to make it extra clear that it is a private API,
* we have moved that to an internal class instance and simplified the interface to the two public methods

View File

@ -1,6 +1,6 @@
function foo() {
bar();
if (foo) {
bar();
}
}
bar();
if (foo) {
bar();
}
}

View File

@ -1,6 +1,6 @@
function foo() {
bar();
if (foo) {
bar();
if (foo) {
bar();
}
}
}
}

View File

@ -1,3 +1,3 @@
async function fn() {
await (() => {});
await (() => {});
}

View File

@ -1,4 +1,4 @@
'use strict';
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
@ -13,6 +13,6 @@ let foo = exports.foo = (() => {
};
})();
var _bar = require('bar');
var _bar = require("bar");
var _bar2 = babelHelpers.interopRequireDefault(_bar);
var _bar2 = babelHelpers.interopRequireDefault(_bar);

View File

@ -1,19 +1,19 @@
"use strict";
var Child = function (_Parent) {
babelHelpers.inherits(Child, _Parent);
babelHelpers.inherits(Child, _Parent);
function Child() {
babelHelpers.classCallCheck(this, Child);
function Child() {
babelHelpers.classCallCheck(this, Child);
var _this = babelHelpers.possibleConstructorReturn(this, (Child.__proto__ || Object.getPrototypeOf(Child)).call(this));
var _this = babelHelpers.possibleConstructorReturn(this, (Child.__proto__ || Object.getPrototypeOf(Child)).call(this));
_this.scopedFunctionWithThis = function () {
_this.name = {};
};
_this.scopedFunctionWithThis = function () {
_this.name = {};
};
return _this;
}
return _this;
}
return Child;
}(Parent);
return Child;
}(Parent);

View File

@ -7,7 +7,7 @@ export default (param => {
}
babelHelpers.createClass(App, [{
key: 'getParam',
key: "getParam",
value: function getParam() {
return param;
}
@ -17,4 +17,4 @@ export default (param => {
prop1: 'prop1',
prop2: 'prop2'
}, _temp;
});
});

View File

@ -1,20 +1,20 @@
function withContext(ComposedComponent) {
var _class, _temp;
var _class, _temp;
return _temp = _class = function (_Component) {
babelHelpers.inherits(WithContext, _Component);
return _temp = _class = function (_Component) {
babelHelpers.inherits(WithContext, _Component);
function WithContext() {
babelHelpers.classCallCheck(this, WithContext);
return babelHelpers.possibleConstructorReturn(this, (WithContext.__proto__ || Object.getPrototypeOf(WithContext)).apply(this, arguments));
}
function WithContext() {
babelHelpers.classCallCheck(this, WithContext);
return babelHelpers.possibleConstructorReturn(this, (WithContext.__proto__ || Object.getPrototypeOf(WithContext)).apply(this, arguments));
}
return WithContext;
}(Component), _class.propTypes = {
context: PropTypes.shape({
addCss: PropTypes.func,
setTitle: PropTypes.func,
setMeta: PropTypes.func
})
}, _temp;
}
return WithContext;
}(Component), _class.propTypes = {
context: PropTypes.shape({
addCss: PropTypes.func,
setTitle: PropTypes.func,
setMeta: PropTypes.func
})
}, _temp;
}

View File

@ -1,22 +1,22 @@
"use strict";
var Child = function (_Parent) {
babelHelpers.inherits(Child, _Parent);
babelHelpers.inherits(Child, _Parent);
function Child() {
babelHelpers.classCallCheck(this, Child);
function Child() {
babelHelpers.classCallCheck(this, Child);
var _this = babelHelpers.possibleConstructorReturn(this, (Child.__proto__ || Object.getPrototypeOf(Child)).call(this));
var _this = babelHelpers.possibleConstructorReturn(this, (Child.__proto__ || Object.getPrototypeOf(Child)).call(this));
Object.defineProperty(_this, "scopedFunctionWithThis", {
enumerable: true,
writable: true,
value: function value() {
_this.name = {};
}
});
return _this;
}
Object.defineProperty(_this, "scopedFunctionWithThis", {
enumerable: true,
writable: true,
value: function value() {
_this.name = {};
}
});
return _this;
}
return Child;
}(Parent);
return Child;
}(Parent);

View File

@ -7,13 +7,13 @@ export default (param => {
}
babelHelpers.createClass(App, [{
key: 'getParam',
key: "getParam",
value: function getParam() {
return param;
}
}]);
return App;
}(), Object.defineProperty(_class, 'props', {
}(), Object.defineProperty(_class, "props", {
enumerable: true,
writable: true,
value: {
@ -21,4 +21,4 @@ export default (param => {
prop2: 'prop2'
}
}), _temp;
});
});

View File

@ -1,24 +1,24 @@
function withContext(ComposedComponent) {
var _class, _temp;
var _class, _temp;
return _temp = _class = function (_Component) {
babelHelpers.inherits(WithContext, _Component);
return _temp = _class = function (_Component) {
babelHelpers.inherits(WithContext, _Component);
function WithContext() {
babelHelpers.classCallCheck(this, WithContext);
return babelHelpers.possibleConstructorReturn(this, (WithContext.__proto__ || Object.getPrototypeOf(WithContext)).apply(this, arguments));
}
function WithContext() {
babelHelpers.classCallCheck(this, WithContext);
return babelHelpers.possibleConstructorReturn(this, (WithContext.__proto__ || Object.getPrototypeOf(WithContext)).apply(this, arguments));
}
return WithContext;
}(Component), Object.defineProperty(_class, "propTypes", {
enumerable: true,
writable: true,
value: {
context: PropTypes.shape({
addCss: PropTypes.func,
setTitle: PropTypes.func,
setMeta: PropTypes.func
})
}
}), _temp;
}
return WithContext;
}(Component), Object.defineProperty(_class, "propTypes", {
enumerable: true,
writable: true,
value: {
context: PropTypes.shape({
addCss: PropTypes.func,
setTitle: PropTypes.func,
setMeta: PropTypes.func
})
}
}), _temp;
}

View File

@ -1,16 +1,16 @@
function fn() {
while (true) {
(function () {
switch (true) {
default:
var foo = 4;
if (true) {
var bar = function () {
return foo;
};
console.log(bar());
}
}
})();
}
}
while (true) {
(function () {
switch (true) {
default:
var foo = 4;
if (true) {
var bar = function () {
return foo;
};
console.log(bar());
}
}
})();
}
}

View File

@ -1,49 +1,49 @@
'use strict';
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
value: true
});
exports.default = undefined;
var _net = require('net');
var _net = require("net");
var _net2 = babelHelpers.interopRequireDefault(_net);
var _events = require('events');
var _events = require("events");
var _binarySerializer = require('./helpers/binary-serializer');
var _binarySerializer = require("./helpers/binary-serializer");
var _binarySerializer2 = babelHelpers.interopRequireDefault(_binarySerializer);
// import ...
var Connection = function (_EventEmitter) {
babelHelpers.inherits(Connection, _EventEmitter);
babelHelpers.inherits(Connection, _EventEmitter);
function Connection(endpoint, joinKey, joinData, roomId) {
babelHelpers.classCallCheck(this, Connection);
function Connection(endpoint, joinKey, joinData, roomId) {
babelHelpers.classCallCheck(this, Connection);
var _this = babelHelpers.possibleConstructorReturn(this, (Connection.__proto__ || Object.getPrototypeOf(Connection)).call(this));
var _this = babelHelpers.possibleConstructorReturn(this, (Connection.__proto__ || Object.getPrototypeOf(Connection)).call(this));
_this.isConnected = false;
_this.roomId = roomId;
_this.isConnected = false;
_this.roomId = roomId;
// ...
return _this;
// ...
return _this;
}
babelHelpers.createClass(Connection, [{
key: "send",
value: function send(message) {
this.sock.write(_binarySerializer2.default.serializeMessage(message));
}
babelHelpers.createClass(Connection, [{
key: 'send',
value: function send(message) {
this.sock.write(_binarySerializer2.default.serializeMessage(message));
}
}, {
key: 'disconnect',
value: function disconnect() {
this.sock.close();
}
}]);
return Connection;
}, {
key: "disconnect",
value: function disconnect() {
this.sock.close();
}
}]);
return Connection;
}(_events.EventEmitter);
exports.default = Connection;
exports.default = Connection;

View File

@ -1,11 +1,11 @@
'use strict';
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var _BaseFoo2 = require('./BaseFoo');
var _BaseFoo2 = require("./BaseFoo");
var _BaseFoo3 = babelHelpers.interopRequireDefault(_BaseFoo2);
@ -18,13 +18,13 @@ var SubFoo = function (_BaseFoo) {
}
babelHelpers.createClass(SubFoo, null, [{
key: 'talk',
key: "talk",
value: function talk() {
babelHelpers.get(SubFoo.__proto__ || Object.getPrototypeOf(SubFoo), 'talk', this).call(this);
babelHelpers.get(SubFoo.__proto__ || Object.getPrototypeOf(SubFoo), "talk", this).call(this);
console.log('SubFoo.talk');
}
}]);
return SubFoo;
}(_BaseFoo3.default);
exports.default = SubFoo;
exports.default = SubFoo;

View File

@ -1,11 +1,11 @@
'use strict';
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var _react = require('react');
var _react = require("react");
var _react2 = babelHelpers.interopRequireDefault(_react);
@ -18,15 +18,15 @@ var RandomComponent = function (_Component) {
}
babelHelpers.createClass(RandomComponent, [{
key: 'render',
key: "render",
value: function render() {
return _react2.default.createElement(
'div',
{ className: 'sui-RandomComponent' },
"div",
{ className: "sui-RandomComponent" },
_react2.default.createElement(
'h2',
"h2",
null,
'Hi there!'
"Hi there!"
)
);
}
@ -34,4 +34,4 @@ var RandomComponent = function (_Component) {
return RandomComponent;
}(_react.Component);
exports.default = RandomComponent;
exports.default = RandomComponent;

View File

@ -5,10 +5,10 @@ var C = function () {
}
babelHelpers.createClass(C, [{
key: 'm',
key: "m",
value: function m(x: number): string {
return 'a';
}
}]);
return C;
}();
}();

View File

@ -1,5 +1,5 @@
define(['./foo', './bar', './derp', './qux'], function (_foo, _bar, _derp, _qux) {
'use strict';
define(["./foo", "./bar", "./derp", "./qux"], function (_foo, _bar, _derp, _qux) {
"use strict";
var _bar2 = babelHelpers.interopRequireDefault(_bar);
});
});

View File

@ -1,13 +1,13 @@
define(['exports', 'foo'], function (exports, _foo) {
'use strict';
define(["exports", "foo"], function (exports, _foo) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, 'default', {
Object.defineProperty(exports, "default", {
enumerable: true,
get: function () {
return _foo.default;
}
});
});
});

View File

@ -1,11 +1,11 @@
'use strict';
"use strict";
require('./foo');
require("./foo");
var _bar = require('./bar');
var _bar = require("./bar");
var _bar2 = babelHelpers.interopRequireDefault(_bar);
require('./derp');
require("./derp");
var _qux = require('./qux');
var _qux = require("./qux");

View File

@ -1,14 +1,14 @@
'use strict';
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _foo = require('foo');
var _foo = require("foo");
Object.defineProperty(exports, 'default', {
Object.defineProperty(exports, "default", {
enumerable: true,
get: function () {
return _foo.default;
}
});
});

View File

@ -1,6 +1,6 @@
'use strict';
"use strict";
var _foo = require('foo');
var _foo = require("foo");
_foo.bar();
_foo.baz();
_foo.baz();

View File

@ -1,10 +1,10 @@
'use strict';
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _bar = require('bar');
var _bar = require("bar");
Object.keys(_bar).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
@ -16,10 +16,10 @@ Object.keys(_bar).forEach(function (key) {
});
});
var _foo = require('foo');
var _foo = require("foo");
var _foo2 = _interopRequireDefault(_foo);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var anything = {};
var anything = {};

View File

@ -1,13 +1,13 @@
'use strict';
"use strict";
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
var _foo = require('foo');
var _foo = require("foo");
var _foo2 = _interopRequireDefault(_foo);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
const _bar = bar,
_bar2 = _slicedToArray(_bar, 1),
x = _bar2[0];
x = _bar2[0];

View File

@ -1,15 +1,15 @@
'use strict';
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _foo = require('foo');
var _foo = require("foo");
var _foo2 = _interopRequireDefault(_foo);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
console.log(_foo2['default']);
console.log(_foo2["default"]);
exports['default'] = 5;
exports["default"] = 5;

View File

@ -1,3 +1,3 @@
'use strict';
"use strict";
var _foo = require('foo');
var _foo = require("foo");

View File

@ -1,10 +1,10 @@
'use strict';
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _mod = require('mod');
var _mod = require("mod");
Object.keys(_mod).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
@ -14,4 +14,4 @@ Object.keys(_mod).forEach(function (key) {
return _mod[key];
}
});
});
});

View File

@ -1,6 +1,6 @@
'use strict';
"use strict";
var _foo = require('foo');
var _foo = require("foo");
_foo.bar();
_foo.baz();
_foo.baz();

View File

@ -7,10 +7,10 @@ System.register([], function (_export, _context) {
});
}
_export('lazyLoadOperation', lazyLoadOperation);
_export("lazyLoadOperation", lazyLoadOperation);
return {
setters: [],
execute: function () {}
};
});
});

View File

@ -1,19 +1,19 @@
var t = function (f) {
var x = f;
x = arguments.length <= 1 ? undefined : arguments[1];
x = arguments.length <= 2 ? undefined : arguments[2];
var x = f;
x = arguments.length <= 1 ? undefined : arguments[1];
x = arguments.length <= 2 ? undefined : arguments[2];
};
function t(f) {
var x = f;
x = arguments.length <= 1 ? undefined : arguments[1];
x = arguments.length <= 2 ? undefined : arguments[2];
var x = f;
x = arguments.length <= 1 ? undefined : arguments[1];
x = arguments.length <= 2 ? undefined : arguments[2];
}
function u(f, g) {
var x = f;
var y = g;
x[12] = arguments.length <= 2 ? undefined : arguments[2];
y.prop = arguments.length <= 3 ? undefined : arguments[3];
var z = (arguments.length <= 4 ? undefined : arguments[4]) | 0 || 12;
}
var x = f;
var y = g;
x[12] = arguments.length <= 2 ? undefined : arguments[2];
y.prop = arguments.length <= 3 ? undefined : arguments[3];
var z = (arguments.length <= 4 ? undefined : arguments[4]) | 0 || 12;
}

View File

@ -6,7 +6,7 @@ var args = [1, 2, 3];
var obj = { obj: { fn } };
switch (true) {
case true:
(_obj$obj = obj.obj).fn.apply(_obj$obj, args);
break;
}
case true:
(_obj$obj = obj.obj).fn.apply(_obj$obj, args);
break;
}

View File

@ -1,5 +1,5 @@
class Foo {
bar() {
super.bar.apply(this, [arg1, arg2].concat(babelHelpers.toConsumableArray(args)));
}
}
bar() {
super.bar.apply(this, [arg1, arg2].concat(babelHelpers.toConsumableArray(args)));
}
}

View File

@ -1,5 +1,5 @@
class Foo {
bar() {
super.bar.apply(this, babelHelpers.toConsumableArray(args));
}
}
bar() {
super.bar.apply(this, babelHelpers.toConsumableArray(args));
}
}

View File

@ -1,5 +1,5 @@
export default function (number) {
if (!isNaN(number)) {
return 1;
}
}
if (!isNaN(number)) {
return 1;
}
}

View File

@ -1,4 +1,4 @@
'use strict';
"use strict";
// @flow
var C = function () {
@ -11,4 +11,4 @@ var C = function () {
};
return C;
}();
}();

View File

@ -1,4 +1,4 @@
'use strict';
"use strict";
// @flow
var C = function () {
@ -7,10 +7,10 @@ var C = function () {
}
babelHelpers.createClass(C, [{
key: 'm',
key: "m",
value: function m(x /*: number*/) /*: string*/ {
return 'a';
}
}]);
return C;
}();
}();

View File

@ -1,4 +1,4 @@
'use strict';
"use strict";
var C = function () {
function C() {
@ -10,4 +10,4 @@ var C = function () {
};
return C;
}();
}();

View File

@ -1,4 +1,4 @@
'use strict';
"use strict";
var C = function () {
function C() {
@ -6,10 +6,10 @@ var C = function () {
}
babelHelpers.createClass(C, [{
key: 'm',
key: "m",
value: function m(x) {
return 'a';
}
}]);
return C;
}();
}();

View File

@ -8,4 +8,4 @@ const defunct = {
};
const { outer: { inner: { three } } } = defunct,
other = babelHelpers.objectWithoutProperties(defunct.outer.inner, ['three']);
other = babelHelpers.objectWithoutProperties(defunct.outer.inner, ["three"]);

View File

@ -1,13 +1,13 @@
function _asyncToGenerator(fn) { return function () { return new Promise((resolve, reject) => { var gen = fn.apply(this, arguments); function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } function _next(value) { step("next", value); } function _throw(err) { step("throw", err); } _next(); }); }; }
export default {
function(name) {
return _asyncToGenerator(function* () {
const uppercasedName = name.upperCase();
function(name) {
return _asyncToGenerator(function* () {
const uppercasedName = name.upperCase();
// awaits depending on uppercasedName go here
// awaits depending on uppercasedName go here
return <Foo name={uppercasedName} />;
})();
}
};
return <Foo name={uppercasedName} />;
})();
}
};

View File

@ -5,17 +5,17 @@ import React from 'react';
var _ref = <div />;
class BugReport extends React.Component {
constructor(...args) {
var _temp;
constructor(...args) {
var _temp;
return _temp = super(...args), this.thisWontWork = ({ color }) => data => {
return <div color={color}>does not reference data</div>;
}, this.thisWorks = ({ color }) => data => {
return <div color={color}>{data}</div>;
}, _temp;
}
return _temp = super(...args), this.thisWontWork = ({ color }) => data => {
return <div color={color}>does not reference data</div>;
}, this.thisWorks = ({ color }) => data => {
return <div color={color}>{data}</div>;
}, _temp;
}
render() {
return _ref;
}
render() {
return _ref;
}
}

View File

@ -1,9 +1,9 @@
class A {
render() {
return _ref;
}
render() {
return _ref;
}
}
export default class B {}
var _ref = React.createElement(B, null);
var _ref = React.createElement(B, null);

View File

@ -1,9 +1,9 @@
class A {
render() {
return _ref;
}
render() {
return _ref;
}
}
export class B {}
var _ref = React.createElement(B, null);
var _ref = React.createElement(B, null);

View File

@ -1,50 +1,49 @@
React.createElement(
'div',
"div",
null,
'wow'
"wow"
);
React.createElement(
'div',
"div",
null,
'w\xF4w'
"w\xF4w"
);
React.createElement(
'div',
"div",
null,
'w & w'
"w & w"
);
React.createElement(
'div',
"div",
null,
'w & w'
"w & w"
);
React.createElement(
'div',
"div",
null,
'w \xA0 w'
"w \xA0 w"
);
React.createElement(
'div',
"div",
null,
'this should not parse as unicode: \\u00a0'
"this should not parse as unicode: \\u00a0"
);
React.createElement(
'div',
"div",
null,
'this should parse as nbsp: \xA0 '
"this should parse as nbsp: \xA0 "
);
React.createElement(
'div',
"div",
null,
'this should parse as unicode: ',
"this should parse as unicode: ",
'\u00a0 '
);
React.createElement(
'div',
"div",
null,
'w < w'
);
"w < w"
);

View File

@ -1,5 +1,5 @@
React.createElement(
'button',
{ 'data-value': 'a value' },
'Button'
);
"button",
{ "data-value": "a value" },
"Button"
);

View File

@ -1,6 +1,6 @@
var func = regeneratorRuntime.mark(function _callee() {var actual;return regeneratorRuntime.wrap(function _callee$(_context) {while (1) switch (_context.prev = _context.next) {case 0:_context.next = 2;return (
obj.
method().
method2());case 2:
obj.
method().
method2());case 2:
actual = true;case 3:case "end":return _context.stop();}}, _callee, this);});
actual = true;case 3:case "end":return _context.stop();}}, _callee, this);});