Joseph Frazier
f9b8fa1ddf
Add comments property to babylon.parseExpression() result
2017-07-14 09:22:23 -05:00
Justin Ridgewell
62d313e753
Fix function.sent parsing
2017-07-07 23:14:20 -04:00
Brian Ng
5180ecdca4
Use prettier ( #600 )
2017-06-28 12:41:42 -04:00
Andy
97c23461f9
TypeScript parser plugin ( #523 )
2017-06-28 10:57:50 -04:00
Henry Zhu
f7547fd35a
Use the string "module" in err message ( #598 )
2017-06-28 10:46:30 -04:00
William Horton
baa5f4dca7
Stage 2: BigInt ( #588 )
...
* Stage 2: BigInt
* Change plugin name to bigInt (camelcase).
* Update based on PR review, add test cases.
* Use hex for charCodes.
2017-06-27 23:35:57 -04:00
Henry Zhu
88298536c5
Revert "Distinguish between ternary's : and arrow fn's return type ( #573 )"
...
This reverts commit a9a55fbd3fcb0dcd83758549dfd2c4fa3d0dcaa2.
2017-06-27 15:58:57 -04:00
Nicolò Ribaudo
a9a55fbd3f
Distinguish between ternary's : and arrow fn's return type ( #573 )
...
* Distinguish between ternary's : and arrow fn's return type
* Correctly parse nested arrow functions inside conditional expressions
Defer the conversion of arrow function parameters to assignable nodes so that
it is possible to use the (invalid) ast to get the exact position of the (wrong)
arrow functions.
* Check params of arrow fns w/ type params or w/o return type
* Fix also async functions
* Add test from prettier
https://github.com/prettier/prettier/issues/2194
* Don't check arrow params if they are valid at the first attemp
* Use state instead of relying on the "noArrowParamsConversion" parameter
* Remove noArrowParamsConversion
2017-06-27 15:44:56 -04:00
Karl Cheng
43dba7e7c1
Throw on attempt to delete a private field
...
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.
2017-06-23 18:34:59 +10:00
Peeyush Kushwaha
e5fdb3448d
rename decoratorsStage2 -> decorators2
2017-06-22 02:00:36 +05:30
Peeyush Kushwaha
4f8ac6bada
Merge branch 'master' into decorators-stage-2
2017-06-18 01:33:16 +05:30
Peeyush Kushwaha
38c417e971
Reorganize tests; camelCase plugin name
2017-06-18 01:25:54 +05:30
Peeyush Kushwaha
9c639743dd
Disallow in object literals, params, class props
...
And add tests to reflect the same
2017-06-17 17:49:33 +05:30
Andy
50ae16de38
Factor parseSubscript out of parseSubscripts ( #576 )
2017-06-14 00:26:12 +02:00
Henry Zhu
2b7fab87d0
fix flow
2017-06-06 11:49:24 -04:00
Daniel Tschinder
69cba43f82
Fix parsing of private fields ( #566 )
...
The computed key is not part of the spec.
key for ClassProperties is an Expression
Do not parse computed and literal keys for PrivateClassProperties
2017-06-06 11:42:07 -04:00
Sven SAULEAU
e064bb9135
Merge pull request #545 from xtuc/feat-optional-chaining
...
Optional Chaining: Stage 1 plugin
2017-06-05 23:13:16 +02:00
Daniel Tschinder
775dcfa6d6
Improve performance by removing all spread/rest usages ( #561 )
2017-06-05 19:21:41 +02:00
Justin Ridgewell
e1ec23cd3e
Finish optionalChaining plugin
2017-06-03 01:20:40 -04:00
Henry Zhu
2dd624b44e
Merge branch 'master' into feat-optional-chaining
2017-05-31 14:33:47 -04:00
Jan Olaf Krems
d4e842d4eb
Add plugin for import.meta proposal ( #544 )
...
* 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
2017-05-30 19:28:51 -04:00
Sven SAULEAU
c1702e1da6
fix: minor change
2017-05-30 20:16:13 +02:00
Sven SAULEAU
9bcd85acf3
feat: CallExpression support
2017-05-30 20:12:43 +02:00
Sven SAULEAU
51bd87baa8
feat: use syntax plugin
2017-05-30 18:35:29 +02:00
Sven SAULEAU
d3bc8fcbdf
Merge branch 'master' into feat-optional-chaining
2017-05-29 18:43:40 +02:00
Andy
50694f99b1
Extract 'parseClassMember' method ( #533 )
2017-05-26 23:44:56 -04:00
Brian Ng
aad95c63ec
Fix some flow unused warnings ( #543 )
2017-05-26 23:44:36 -04:00
Diego Ferreiro Val
01da62283c
Modify grammar to support Private Fields proposal: ( #260 )
...
* Modify grammar to support Private Fields proposal:
- Adding optional plugin `classPrivateProperties`
- Adding PrivateName type identifier
- Adding ClassPrivateProperty to ClassBody
- Allow PrivateName in MemberExpression
- Allow PrivateName as a reference
- Adding tests
* Remove unnecesary liberal parameter
* Guarding for plugin dependecy for future versioning
* update spec.md [skip ci]
* move comment [skip ci]
* remove unused param [skip ci]
* Refactor PrivateName to contain Identifier in name property
2017-05-22 11:33:48 -04:00
Brian Ng
dcef4012a0
Disallow SpreadElement inside dynamic import ( #529 )
...
* Disallow SpreadElement inside dynamic import
* tweak error message
2017-05-17 12:07:09 -04:00
Andy
aa78011666
Fix type check errors ( #521 )
2017-05-14 19:59:56 +02:00
Andy
d95b5fb83d
Remove unused parameters from parseParenAndDistinguishExpression ( #522 )
2017-05-14 19:59:03 +02:00
Andy
a738870472
Type-check ExpressionParser ( #488 )
...
* Type-check ExpressionParser
* Improve test coverage
2017-05-11 16:30:21 +02:00
Brian Ng
d33c82781a
Allow super in class properties ( #499 )
2017-05-02 14:41:10 -04:00
Andy
9660f06b25
Don't add 'shorthand' property to ObjectMethod ( #506 )
2017-05-02 14:39:21 -04:00
Andy
c4fb3fe742
Convert each file with parser methods to a class in an inheritance chain ( #481 )
2017-04-24 00:40:49 +02:00
Brian Ng
bc0719a145
Ensure non pattern shorthand props are checked for reserved words ( #479 )
2017-04-21 16:25:34 +02:00
Sven SAULEAU
b2fdd944fe
feat: add tests
2017-04-17 13:33:00 +02:00
Sven SAULEAU
0927e24ac6
Merge remote-tracking branch 'kristofdegrave/nullPropagation' into feat-optional-chaining
2017-04-17 13:21:35 +02:00
Sven SAULEAU
7b51979152
feat: add optional MemberExpression
2017-04-15 18:19:43 +02:00
Henry Zhu
9f7d9080cf
remove babylon plugin for template revision since it's stage-4 ( #426 )
2017-03-22 14:05:56 -04:00
Arshabh Kumar Agarwal
964105e3fb
Improves error message when super is called outside of constructor ( #408 )
2017-03-21 17:44:21 -04:00
Kevin Gibbons
2e467ef3bc
Add support for invalid escapes in tagged templates ( #274 )
...
Per the stage-3 TC39 proposal:
https://github.com/tc39/proposal-template-literal-revision
2017-03-21 16:55:54 -04:00
Brian Ng
7a6d495704
Throw error if new.target is used outside of a function ( #402 )
2017-03-08 16:34:22 +01:00
Henry Zhu
5e0cce4974
Merge branch 'master' into 7.0
2017-02-28 14:37:13 -05:00
Brian Ng
09bb9bc6be
Fix parsing yield with dynamicImport ( #383 )
2017-02-28 12:43:34 -05:00
Henry Zhu
8d90dc0d10
[7.0] Change RestProperty/SpreadProperty to RestElement/SpreadElement ( #384 )
...
* [7.0] Change RestProperty/SpreadProperty to RestElement/SpreadElement
* Fix rest element in array pattern at invalid location
2017-02-28 12:31:58 -05:00
Brian Ng
cd133ff8e1
Ensure consistent start args for parseParenItem ( #386 )
2017-02-28 12:56:56 +01:00
Daniel Tschinder
50ffa49201
Merge branch 'master' into 7.0
...
# Conflicts:
# src/plugins/flow.js
2017-02-20 22:47:17 +01:00
Daniel Tschinder
2ef00a6631
Fix negative number literal typeannotations ( #366 )
...
* Fix negative number literal typeannotations
Also use parseLiteral() to parser string and number literal typeannotations
so that future changes (estree) to literals are also reflected to flow.
* Instead of invalid fallthrough throw immediately
* Increase coverage and better error mesage
2017-02-20 22:43:59 +01:00
Daniel Tschinder
d88befdd30
Merge branch 'master' into 7.0
...
# Conflicts:
# src/parser/index.js
2017-02-12 13:32:06 +01:00