Brian Ng
461ed45942
Fix parse error when destructuring set with default value ( #317 )
2017-01-20 22:21:40 +01:00
Brian Ng
9d78213ab6
Improve error message on attempt to destructure named import ( #288 )
2017-01-14 15:38:30 +01:00
Daniel Tschinder
13bebfdf45
Fail tests that have expected.json and throws-option ( #285 )
...
* Fail tests that have expected.json and throws
* Remove obsolete test files
2017-01-12 22:38:41 +01:00
Kai Cataldo
5fb4353778
Throw error when exporting non-declaration ( #241 )
...
* Throw error when exporting non-declaration
fixes #238
* Do check ahead of parsing export statement
2016-12-01 21:03:13 +01:00
Kai Cataldo
e260381e06
Throw error for reserved words enum and await ( #195 )
...
* Throw error for reserved words enum and await when source type is module
* Extract reserved word check into method
* Fix tests
2016-11-09 16:29:02 +01:00
Thomas Grainger
e05bbeefd1
Fix strange line endings ( #214 )
2016-11-09 16:19:00 +01:00
Moti Zilberman
9b6e243736
Raise error on duplicate definition of __proto__ ( #183 )
...
Spec: http://www.ecma-international.org/ecma-262/6.0/#sec-__proto__-property-names-in-object-initializers
This brings back to life a bit of dead code in Parser.prototype.checkPropClash, and enables several tests that were previously disabled.
2016-10-16 15:16:38 +02: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
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
jezell
9cc0981c51
get / set are valid property names in default assignment ( #142 )
2016-09-27 23:29:16 +02:00
Moti Zilberman
774e6b446b
Rephrase "assigning/binding to rvalue" errors to include context ( #119 ) ( #123 )
...
* Rephrase "assigning/binding to rvalue" error messages with context (#119 )
* Fix code style in parser/lval.js
* istanbul ignore some unused branches in parser/lval.js
* Fix code style again in parser/lval.js
2016-09-22 12:02:20 -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