* Re-name uncatagorised 1 and 2
* Move to es2015
* Add expected.json to parenthesized lhs object
* Orginize into parenthesized-lhs-array and parenthesized-lhs-object
* Remove uncategorised/33 because it was repeditive decorators/class-decorator
* Move uncatagorised/34 to decorators/class-decorator-assignment
* Move uncategorised/35 to decorators/method-decorator
* Move uncategorised/36 to decorators/class-decorator-setter
* Move uncategorised/37 to decorators/class-decorator-getter
* Move uncategorised/38 to decorators/class-decorators-multiple
* Clean up syntax
* Move uncategorised/39 to decorators/object-decorator
* Remove syntax in order to pass tests
* Re-add uncategorisd/33 as decorators/class-decorator-new-line
* Move class-decorator-new-line to class-decorator-same-line
This separates `classPrivateMethods`'s dependency on
`classPrivateProperties`. It also starts a `PrivateName` at the hash
symbol, not the `Identifier`.
* Add support for class private methods
This commit adds parser support for the TC39 Stage 2 Private Methods
proposal.
This commit also changes "key" in ClassPrivateProperty from an
Identifier to a PrivateName, as well as disallowing #constructor as a
valid private field name.
* Add tests for string literal get/set/async
These should be treated as regular methods and not special get/set/async
behaviour.
* Add tests for class private methods
This also removes a test from the Test262 whitelist that failed before
the changes for private methods support and now passes.
* Modify class private prop tests for PrivateName
* Add class private prop tests for #constructor
* Fix existing ASI test case failure
Given that it refers to an identifier, it's somewhat confusing to have
to use .name.name to get the actual string. The type declared within
types.js is also incorrect, which this commit fixes.
* Add optionality to catch bindings (plus tests)
* Update ast/spec, README, set param to null if no param with plugin optionalCatchBinding
* Fix: wrap param = null in else case
* Fix tests for optional catch binding; add tests which include finally clause
The parsing of private fields checks whether or not it is within a
class to determine if it is valid or not. However, the state.inClass
property is incorrect as it marks it as outside a class when the inner
class is closed.
This commit fixes this problem by replacing the state.inClass property
with a class nesting counter.
Given that private fields can only be used within classes, any code
using them must be in a strict mode context. As private fields cannot
be deleted, throw an early SyntaxError.
* Add plugin for import.meta proposal
Fixes https://github.com/babel/babylon/issues/539
* Tests for assignment/mutation of import.meta
* Use correct identifier in failure message
* Simpler & more consistent script errors for import.meta