-
-
Notifications
You must be signed in to change notification settings - Fork 195
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #253 from eslint/issue246
New: Support ecmaVersion 7 (fixes #246)
- Loading branch information
Showing
15 changed files
with
694 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -329,4 +329,4 @@ module.exports = { | |
] | ||
} | ||
] | ||
}; | ||
}; |
222 changes: 222 additions & 0 deletions
222
tests/fixtures/ecma-version/7/exponential-plusplus.result.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,222 @@ | ||
module.exports = { | ||
"type": "Program", | ||
"loc": { | ||
"start": { | ||
"line": 2, | ||
"column": 0 | ||
}, | ||
"end": { | ||
"line": 2, | ||
"column": 9 | ||
} | ||
}, | ||
"range": [ | ||
1, | ||
10 | ||
], | ||
"body": [ | ||
{ | ||
"type": "ExpressionStatement", | ||
"loc": { | ||
"start": { | ||
"line": 2, | ||
"column": 0 | ||
}, | ||
"end": { | ||
"line": 2, | ||
"column": 9 | ||
} | ||
}, | ||
"range": [ | ||
1, | ||
10 | ||
], | ||
"expression": { | ||
"type": "BinaryExpression", | ||
"loc": { | ||
"start": { | ||
"line": 2, | ||
"column": 0 | ||
}, | ||
"end": { | ||
"line": 2, | ||
"column": 8 | ||
} | ||
}, | ||
"range": [ | ||
1, | ||
9 | ||
], | ||
"left": { | ||
"type": "UpdateExpression", | ||
"loc": { | ||
"start": { | ||
"line": 2, | ||
"column": 0 | ||
}, | ||
"end": { | ||
"line": 2, | ||
"column": 3 | ||
} | ||
}, | ||
"range": [ | ||
1, | ||
4 | ||
], | ||
"operator": "++", | ||
"prefix": false, | ||
"argument": { | ||
"type": "Identifier", | ||
"loc": { | ||
"start": { | ||
"line": 2, | ||
"column": 0 | ||
}, | ||
"end": { | ||
"line": 2, | ||
"column": 1 | ||
} | ||
}, | ||
"range": [ | ||
1, | ||
2 | ||
], | ||
"name": "a" | ||
} | ||
}, | ||
"operator": "**", | ||
"right": { | ||
"type": "Literal", | ||
"loc": { | ||
"start": { | ||
"line": 2, | ||
"column": 7 | ||
}, | ||
"end": { | ||
"line": 2, | ||
"column": 8 | ||
} | ||
}, | ||
"range": [ | ||
8, | ||
9 | ||
], | ||
"value": 2, | ||
"raw": "2" | ||
} | ||
} | ||
} | ||
], | ||
"sourceType": "script", | ||
"tokens": [ | ||
{ | ||
"type": "Identifier", | ||
"value": "a", | ||
"loc": { | ||
"start": { | ||
"line": 2, | ||
"column": 0 | ||
}, | ||
"end": { | ||
"line": 2, | ||
"column": 1 | ||
} | ||
}, | ||
"range": [ | ||
1, | ||
2 | ||
] | ||
}, | ||
{ | ||
"type": { | ||
"label": "++/--", | ||
"beforeExpr": false, | ||
"startsExpr": true, | ||
"isLoop": false, | ||
"isAssign": false, | ||
"prefix": true, | ||
"postfix": true, | ||
"binop": null | ||
}, | ||
"value": "++", | ||
"loc": { | ||
"start": { | ||
"line": 2, | ||
"column": 1 | ||
}, | ||
"end": { | ||
"line": 2, | ||
"column": 3 | ||
} | ||
}, | ||
"range": [ | ||
2, | ||
4 | ||
] | ||
}, | ||
{ | ||
"type": { | ||
"label": "**", | ||
"beforeExpr": true, | ||
"startsExpr": false, | ||
"isLoop": false, | ||
"isAssign": false, | ||
"prefix": false, | ||
"postfix": false, | ||
"binop": null, | ||
"updateContext": null | ||
}, | ||
"value": "**", | ||
"loc": { | ||
"start": { | ||
"line": 2, | ||
"column": 4 | ||
}, | ||
"end": { | ||
"line": 2, | ||
"column": 6 | ||
} | ||
}, | ||
"range": [ | ||
5, | ||
7 | ||
] | ||
}, | ||
{ | ||
"type": "Numeric", | ||
"value": "2", | ||
"loc": { | ||
"start": { | ||
"line": 2, | ||
"column": 7 | ||
}, | ||
"end": { | ||
"line": 2, | ||
"column": 8 | ||
} | ||
}, | ||
"range": [ | ||
8, | ||
9 | ||
] | ||
}, | ||
{ | ||
"type": "Punctuator", | ||
"value": ";", | ||
"loc": { | ||
"start": { | ||
"line": 2, | ||
"column": 8 | ||
}, | ||
"end": { | ||
"line": 2, | ||
"column": 9 | ||
} | ||
}, | ||
"range": [ | ||
9, | ||
10 | ||
] | ||
} | ||
] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
a++ ** 2; |
Oops, something went wrong.