Kristof Degrave
b902fe6c7b
?. && ?[ as member access with nullPropagation. If the object is undefined this will return undefined. If the object on which you want to access the property is defined, the value of the propery will be given back.
2017-02-11 16:44:28 +01:00
Daniel Tschinder
c79dd953ea
Fix #304 and #309 ( #339 )
2017-02-10 15:36:46 +01:00
Andrew Levine
9929baaca8
Don't parse class properties without initializers when classProperties is disabled and Flow is enabled ( #300 )
2017-01-23 23:56:39 +01:00
Andrew Levine
cec8bc0354
Add some test coverage for decorators stage-0 plugin ( #250 )
2017-01-05 22:07:40 +01:00
Moti Zilberman
7c18bf83cc
Increase test coverage ( #175 )
...
* Increase test coverage
* Test for error when binding `this` in destructuring pattern
* Ignore coverage of inAsync check in parseAwait - already checked externally
* Ignore coverage of default case in checkPropClash
* Remove unused parameter isAsync from parseParenAndDistinguishExpression
* Ignore coverage of an `else` branch in flowParseTypeParameterDeclaration
* Flow: remove unused parameters to flowParseTypeAnnotatableIdentifier
* Flow: ignore coverage of pass-through throw statement in parseConditional
* Flow: Add test for error on property with type param
* Flow: ignore coverage of pass-through throw statements in parseMaybeAssign, parseArrow
* Add test for error on XML-style comment in module code
* Update test for error on method in object pattern
* Test for error: "Only '=' operator can be used for specifying default value"
2016-10-16 15:04:13 +02:00
Moti Zilberman
b5877f04b1
Fix up #172 ( #177 )
...
* Update two esprima tests to the new "expected TOKEN" messages
* Update dynamic-import to use "expected (" error message
2016-10-14 16:50:07 -04:00
Moti Zilberman
d3af158ba5
Annotate more errors with expected token ( #172 )
...
Expanding on #150 , this allows `unexpected()` to accept the expected token type instead of a message string.
This overload is then used in a couple more places (that independently implement a logic similar to `expect()`'s) to construct an `Unexpected token, expected FOO` message.
2016-10-14 16:10:09 -04:00
Jordan Gensler
c63c1bc728
[dynamic-import] Implementing import() syntax ( #163 )
2016-10-14 14:54:21 -04:00
Daniel Tschinder
d4d6d05d25
Slightly better error messages ( #150 )
...
* Slightly better errors
Instead of "Unexpected token" we now print
"Unexpected token, expected <type.label>"
2016-10-12 10:38:26 -04:00
Kai Cataldo
7dd45f7465
Check for duplicate named exports in exported rest elements/properties ( #164 )
2016-10-10 10:10:16 -04:00
Henry Zhu
5bac6e8ad9
Temporary rollback for erroring on trailing comma with spread ( #154 )
2016-10-01 20:08:25 -04:00
Daniel Tschinder
7877829fcb
Add static errors for object rest ( #149 )
...
* Fix parsing object rest
This makes object-rest-spread behave according to spec and only
allow one rest operator and enforces it to be the last
param in the object.
Also move all object-rest-spread tests to a own folder.
* Show nicer error messages
2016-09-30 11:37:55 -04:00
Moti Zilberman
4e1fbd48d5
Add support for computed class property names ( #120 ) ( #121 )
2016-09-21 21:24:59 -04:00
Daniel Tschinder
abf6ca8e5e
Add tests for export extensions ( #127 )
...
The case which includes a namespaced and default import was not tested yet
2016-09-15 19:24:11 +02:00
Daniel Tschinder
2cfae60b15
Fix issues with default object params in async functions ( #96 )
...
This change allows async functions to have a spread argument which
defines a default value.
2016-08-23 17:19:49 -04:00
Daniel Tschinder
4506822180
Remove exponentiationOperator, asyncFunctions, trailingFunctionCommas ( #98 )
...
* This removes the exponentiationOperator as it is now in es2016
* Remove from tests
* Remove asyncFunctions and restructure test dirs
* Remove trailingFunctionCommas
2016-08-23 17:11:01 -04:00
Daniel Tschinder
97325592fa
Fix exponential operator to behave according to spec ( #75 )
2016-07-17 11:08:12 +02:00
Henry Zhu
d4cd0bf7b7
Actually remove it..
2016-05-02 22:44:50 -04:00
Henry Zhu
c81db57b03
Remove unused file
...
Ref f81c281fc4 (commitcomment-17331315)
2016-05-02 22:43:47 -04:00
Kevin Smith
f81c281fc4
Parse for-await statements when asyncGenerators plugin is active
2016-04-05 13:33:49 -04:00
Shuhei Kagawa
29a6578658
parse parameter decorators
2016-03-25 14:04:33 +09:00
Henry Zhu
2e73358fcc
Add class properties test with a generator method that results in a parse error
2016-02-11 13:03:36 -05:00
Logan Smyth
abd39d688e
Add tests for class property ASI.
2016-02-06 23:01:38 -08:00
Logan Smyth
0c35bbfc07
Revert "babylon: throw parse error if class properties do not have a semicolon (fixes T6873)"
...
This reverts commit 976edfc06740e434d1d5b136e28996a77f909403.
2016-02-06 18:36:31 -08:00
Logan Smyth
d9ade8a63a
Revert "babylon: fix error location for class properties with a missing semicolon"
...
This reverts commit f31099f383b52cf4fe1786188f6421529dea865b.
2016-02-06 18:36:22 -08:00
Henry Zhu
2f00b4c329
babylon: fix error location for class properties with a missing semicolon
2016-01-06 18:42:26 -05:00
Henry Zhu
e849c62144
babylon: throw parse error if class properties do not have a semicolon (fixes T6873)
2015-12-30 14:01:46 -05:00
Henry Zhu
c7bdf7fc63
remove all property, fixup tests
2015-12-23 00:02:02 -05:00
Henry Zhu
7bac3627fe
Remove await* from babel-generator, add parsing error to babylon - (fixes T6688)
2015-12-19 23:15:09 -05:00
Sebastian McKenzie
d79d0cf73d
add function.sent
2015-11-17 23:02:21 -08:00
Sebastian McKenzie
3b3c1897d0
add support for async generator concise methods - fixes #2603
2015-11-03 11:19:04 +00:00
Sebastian McKenzie
ea40d0134f
rename NumberLiteral to NumericLiteral and RegexLiteral to RegExpLiteral
2015-11-03 01:19:35 +00:00
Sebastian McKenzie
c2973d0c7a
disallow invalid async function forms inside object literals - fixes #2629
2015-11-02 08:00:01 +00:00
Sebastian McKenzie
3d842df554
update exponentiation operator precedence - fixes #2431
2015-10-30 23:14:10 +00:00
Sebastian McKenzie
c224a7a370
fix parser bug where arrow functions have a higher precedence than they should - fixes #2118
2015-10-30 22:50:53 +00:00
Sebastian McKenzie
b909a81ab7
6.0.0
...
I'm extremely stupid and didn't commit as I go. To anyone reading this
I'm extremely sorry. A lot of these changes are very broad and I plan on
releasing Babel 6.0.0 today live on stage at Ember Camp London so I'm
afraid I couldn't wait. If you're ever in London I'll buy you a beer
(or assorted beverage!) to make up for it, also I'll kiss your feet and
give you a back massage, maybe.
2015-10-29 17:51:24 +00:00
Sebastian McKenzie
9908dc6f50
update babylon tests
2015-10-05 16:40:43 +01:00
Sebastian McKenzie
ae85fc0251
rename features in babylon tests
2015-09-15 06:13:11 +01:00
Sebastian McKenzie
446b297465
unoverload Literal AST node
2015-09-01 04:49:16 +01:00
Sebastian McKenzie
df021c7f23
add esprima tests and fix bugs picked up by it
2015-08-11 00:59:15 +01:00
Sebastian McKenzie
4fda34ce6f
properly distinguish shorthand async keys that are the last property - fixes #2176
2015-08-06 19:33:48 +01:00
Sebastian McKenzie
5ec9f78493
fix patterns with async keys - fixes #2171
2015-08-05 23:22:31 +01:00
Logan Smyth
c60ffdef7b
Ensure that the original state is restored on lookahead - fixes #2086
2015-07-26 20:56:07 -07:00
Sebastian McKenzie
2948108c90
finish reorganisation of babylon
2015-07-25 08:03:39 +01:00
Sebastian McKenzie
e7fec51feb
remove range property from nodes, clean up babylon codebase
2015-07-25 07:07:22 +01:00
Sebastian McKenzie
bed14e9b42
add espree comment attachment tests and remove ranges test property from babylon tests
2015-07-25 06:07:51 +01:00
Sebastian McKenzie
006f3db76a
update babylon fixtures to use File as the root node rather than Program
2015-07-25 05:24:58 +01:00
Sebastian McKenzie
b088f8e6ef
switch babylon tests to fixtures
2015-07-25 05:19:32 +01:00