Use a keyword (not necessarily private
) as a "private this", such that private.
is identical to the currently proposed #
, but is used similarly to this
.
class Point {
private.x;
private.y;
constructor(x = 0, y = 0) {
from clint.textui import puts, indent, colored | |
def red(msg): | |
return puts(colored.red(msg)) | |
def shell(cmd, fail_silently=False, *args, **kwargs): | |
# tell the user what's about to go out | |
puts(colored.blue("-> {}".format(cmd))) |
const getIndex = (th) => Array.from(th.parentElement.children).indexOf(th) | |
const getChildren = (i) => Array.from(document.querySelectorAll(`td:nth-child(${i + 1})`)) | |
const setHiddenStyle = (node) => { | |
node.style.width = '1px' | |
node.style.overflow = 'hidden' | |
node.style.overflowWrap = 'normal' | |
} | |
const toggleHidden = (node) => { | |
if (node.style.length) { | |
node.style = {} |
diff --git a/src/grammar.coffee b/src/grammar.coffee | |
index 4ff9a1c..7229664 100644 | |
--- a/src/grammar.coffee | |
+++ b/src/grammar.coffee | |
@@ -365,7 +365,7 @@ grammar = | |
Export: [ | |
o 'EXPORT Class', -> new Export $2 | |
- o 'EXPORT Identifier = Expression', -> new Export new Assign($2, $4) | |
+ o 'EXPORT Identifier = Expression', -> new Export new Assign($2, $4, 'export') |
diff --git a/tests/prettier/__snapshots__/jsfmt.spec.js.snap b/tests/prettier/__snapshots__/jsfmt.spec.js.snap | |
index 826b40c..5d5ca84 100644 | |
--- a/tests/prettier/__snapshots__/jsfmt.spec.js.snap | |
+++ b/tests/prettier/__snapshots__/jsfmt.spec.js.snap | |
@@ -49,19 +49,19 @@ const comp5 = <div>Keep it on one line.</div>; | |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
const comp1 = ( | |
<div style={styles} key=\"something\"> | |
- Keep the wrapping parens. | |
+ Keep the wrapping parens. |
if (!Symbol.matches) { | |
const DEFINE_PROPERTY = "defineProperty"; | |
// define Symbol.matches | |
Object[DEFINE_PROPERTY](Symbol, "matches", { | |
configurable: false, | |
writable: false, | |
value: Symbol("matches"), | |
}); |
Use a keyword (not necessarily private
) as a "private this", such that private.
is identical to the currently proposed #
, but is used similarly to this
.
class Point {
private.x;
private.y;
constructor(x = 0, y = 0) {
// | |
// at the bottom of `function format(argv, input, opt) {`, near line 20367 | |
const pp = prettier$3.format(input, opt); | |
const ast = cleanAST(prettier$3.__debug.parse(input, opt)); | |
const past = cleanAST(prettier$3.__debug.parse(pp, opt)); | |
if (ast !== past) { | |
const MAX_AST_SIZE = 2097152; // 2MB | |
const astDiff = |
Bacon = require('baconjs') | |
Imm = require('immutable') | |
React = require('react') | |
window.Actions = | |
changeFirstName: new Bacon.Bus() | |
changeLastName: new Bacon.Bus() | |
changeCountry: new Bacon.Bus() | |
addCountryBird: new Bacon.Bus() | |
addFriend: new Bacon.Bus() |
var ChatAppDispatcher = require('../dispatcher/ChatAppDispatcher'); | |
var ChatConstants = require('../constants/ChatConstants'); | |
var ChatMessageUtils = require('../utils/ChatMessageUtils'); | |
var EventEmitter = require('events').EventEmitter; | |
var ThreadStore = require('../stores/ThreadStore'); | |
var merge = require('react/lib/merge'); | |
var ActionTypes = ChatConstants.ActionTypes; | |
var CHANGE_EVENT = 'change'; |