Skip to content

Commit

Permalink
Merge pull request #255 from eslint/issue254
Browse files Browse the repository at this point in the history
Fix: exponentiation operator token (fixes #254)
  • Loading branch information
nzakas committed Feb 26, 2016
2 parents 922562a + 3614e81 commit 2b93452
Show file tree
Hide file tree
Showing 16 changed files with 20 additions and 58 deletions.
1 change: 1 addition & 0 deletions lib/token-translator.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ TokenTranslator.prototype = {
type === tt.colon || type === tt.question ||
type === tt.bracketR || type === tt.ellipsis ||
type === tt.arrow || type === tt.jsxTagStart ||
type === tt.incDec || type === tt.starstar ||
type === tt.jsxTagEnd || (type.binop && !type.keyword) ||
type.isAssign) {

Expand Down
25 changes: 3 additions & 22 deletions tests/fixtures/ecma-version/7/exponential-plusplus.result.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,16 +128,7 @@ module.exports = {
]
},
{
"type": {
"label": "++/--",
"beforeExpr": false,
"startsExpr": true,
"isLoop": false,
"isAssign": false,
"prefix": true,
"postfix": true,
"binop": null
},
"type": "Punctuator",
"value": "++",
"loc": {
"start": {
Expand All @@ -155,17 +146,7 @@ module.exports = {
]
},
{
"type": {
"label": "**",
"beforeExpr": true,
"startsExpr": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"type": "Punctuator",
"value": "**",
"loc": {
"start": {
Expand Down Expand Up @@ -219,4 +200,4 @@ module.exports = {
]
}
]
};
};
14 changes: 2 additions & 12 deletions tests/fixtures/ecma-version/7/exponential-precedence.result.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,17 +183,7 @@ module.exports = {
]
},
{
"type": {
"label": "**",
"beforeExpr": true,
"startsExpr": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"type": "Punctuator",
"value": "**",
"loc": {
"start": {
Expand Down Expand Up @@ -247,4 +237,4 @@ module.exports = {
]
}
]
};
};
14 changes: 2 additions & 12 deletions tests/fixtures/ecma-version/7/exponential-simple.result.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,17 +110,7 @@ module.exports = {
]
},
{
"type": {
"label": "**",
"beforeExpr": true,
"startsExpr": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"type": "Punctuator",
"value": "**",
"loc": {
"start": {
Expand Down Expand Up @@ -174,4 +164,4 @@ module.exports = {
]
}
]
};
};
2 changes: 1 addition & 1 deletion tests/fixtures/libraries/XMLHttpRequest.js.result.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tests/fixtures/libraries/angular-1.2.5.js.result.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tests/fixtures/libraries/backbone-1.1.0.js.result.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tests/fixtures/libraries/benchmark.js.result.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tests/fixtures/libraries/escodegen.browser.js.result.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tests/fixtures/libraries/escope.js.result.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tests/fixtures/libraries/esmangle.browser.js.result.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tests/fixtures/libraries/esrefactor.js.result.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tests/fixtures/libraries/jquery-1.9.1.js.result.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tests/fixtures/libraries/mootools-1.4.5.js.result.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tests/fixtures/libraries/underscore-1.5.2.js.result.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tests/fixtures/libraries/yui-3.12.0.js.result.json

Large diffs are not rendered by default.

0 comments on commit 2b93452

Please sign in to comment.