Logan Smyth
3c8e9acd4a
Make the unambiguous grammar select module when import.meta is used.
2018-03-09 14:44:06 -08:00
Logan Smyth
958551fd89
Refactor unambiguous to track state during parsing.
2018-03-09 14:35:55 -08:00
Logan Smyth
7901e7d1b9
Fix flowtype errors introduced in #7503 . ( #7531 )
2018-03-08 16:02:28 -08:00
Brian Ng
f97d4313c9
Update test262 test script and a few keyword escape fixes ( #7503 )
...
* Update test262 and whitelist
* Use test262-stream
* Check escapes in contextual keywords
* Check escapes when parsing new.target
* Check escapes for getters/setters
* Check escapes for static class methods
* Check escapes on async arrow and functions
2018-03-08 09:10:00 -06:00
Daniel Tschinder
5d615dd198
Disallow setters to have RestElement ( #7498 )
2018-03-05 18:03:59 -06:00
K Sashi Kumar
d187c26748
Spec Violation: Fix var initializer in for-in loop ( #7392 )
2018-03-04 16:18:32 -08:00
Logan Smyth
5f6e3122a0
Give users helpful feedback if they are detected as using the wrong sourceType.
2018-03-04 14:12:37 -08:00
Logan Smyth
5c3092d86f
Expand .raise() to allow more options.
2018-03-04 13:38:12 -08:00
K Sashi Kumar
ae0df86340
Remove broken check in checkFunctionNameAndParams ( #7473 )
2018-03-04 16:34:16 +01:00
Logan Smyth
7ff4a73916
Upgrade flow to 0.66 and fix a few minor errors. ( #7431 )
2018-02-25 19:22:23 -08:00
Brian Ng
8823e4247e
Fix up flow errors ( #7227 )
...
* charcodes@0.1.0
* Add hasFlowComment to tokenizer/state
* Fix babel-types flow errors
* Add isIterator to tokenizer/state
* Remove unnecessary argument from flow/readToken
* Add annotation to tokenizer/isIterator
* Fix reference to generated index.js.flow
* Add workaround in babel-template expression formatter
* Fix tsEatThenParseType return type
* Fix inconsistency with ParseSubscript state
* Add workaround for flow handling error with tagged template in optional chain
* Add flow workaround in expectPlugin inside tokenizer
2018-02-25 18:12:33 -08:00
Andy
6f3be3a543
typescript: Support definite assignment assertion ( #7159 )
2018-02-24 16:26:07 -06:00
Andy
6f6c8dabba
TypeScript: Support conditional types syntax ( #7404 )
...
Microsoft/TypeScript#21316 and Microsoft/TypeScript#21496
2018-02-24 14:56:14 +01:00
Justin Ridgewell
7e90d56024
Proposal: Logical Assignment Operators ( #7385 )
...
* Proposal: Logical Assignment Operators
https://github.com/jridgewell/proposal-logical-assignment
I'm bringing it [back](https://github.com/babel/babel/pull/516 ). 😉
* Use expectPlugin
* Add to stage 0 preset
* Add logicalAssignment missing plugin log stuff
2018-02-18 13:56:29 -05:00
Naveen jain
a3ad518ce1
[BugFix] : OptionalChaining Bug fixes ( #7288 )
...
* Added optionalExpression types to babylon and babel-types
* OptionalChain transforms bug fix
* Added OptionalExpressions to babel-generator. Fixed OptionalChain Bugs
* Removed 'optionalChain' from newExpression and added test cases
* Added test cases for optionalChain
* Update index.js
2018-02-07 19:42:14 -05:00
K Sashi Kumar
ed98d2491e
[Typescript] - Fix SyntaxError in async arrow functions with rest params ( #7297 )
...
* Fix: [Typescript] - SyntaxError in async arrow functions with rest params
* Fix optional params and add test code in flow
2018-01-31 21:05:24 +01:00
Naveen jain
65ae4ff15b
Fix: export default decorated class parsed as class expression ( #7189 )
2018-01-30 12:00:29 -05:00
Brian Ng
fa5eb4f605
Make comment props more consistent ( #7246 )
2018-01-26 10:39:52 -05:00
Andy
dccfed3601
TypeScript: Support parsing 'unique' type operator ( #7239 )
2018-01-22 16:09:22 -05:00
Andy
667f5815c1
typescript: Properly set this.state.inType one token before parsing a type ( #7225 )
...
* typescript: Properly set this.state.inType one token before parsing a type
* Reuse tsParseTypeArguments and inline tsExpectLessThanThenParseInType
2018-01-17 08:36:04 -05:00
Raja Sekar
2d05487293
Add support for @@iterator ( #7058 )
2018-01-12 09:19:11 -06:00
Peri Nikhil
c3352ad2e0
Fix: unicode characters not allowed in regexes ( #7179 )
...
Issue #6691
2018-01-10 15:33:21 +01:00
Maaz Syed Adeeb
74682f33bc
Support 'assert and assign' TypeScript syntax ( #7098 )
2018-01-08 15:29:27 -06:00
Sophie Alpert
8250ff963e
Suggest JSX fragment syntax in adjacent tag error ( #7152 )
2018-01-04 09:21:39 +01:00
Raja Sekar
e872f0d975
Regex parsing issue fix after function declaration. ( #7121 )
2018-01-03 14:21:18 +01:00
Andy
49775e2f12
Remove redundant property declarations ( #7144 )
2018-01-02 22:20:54 +01:00
Raja Sekar
f3410e761c
Flow comment parsing ( #7007 )
2017-12-30 23:53:08 +01:00
Andy
6a73f39199
Support parsing export default abstract class {} ( #7075 )
2017-12-21 16:13:31 +01:00
Brian Ng
2b065350b5
Treat import type * as a parser error ( #7061 )
2017-12-19 10:54:20 -05:00
Brian Ng
f5ef928586
Add method property to ObjectTypeProperty ( #7005 )
2017-12-11 09:32:16 -06:00
Brian Ng
c7980b2b90
Bump prettier ( #6991 )
2017-12-07 17:36:49 -05:00
K Sashi Kumar
ac745ded0d
Fix destructuring assignment spec violation ( #6986 )
2017-12-07 09:14:03 -06:00
Andy
aa38c47160
For babylon typescript parser, fix false positive for ! after a line break ( #6969 )
...
Closes #6798
2017-12-04 19:57:22 +01:00
Nicolò Ribaudo
62bbee97d7
Better error message for import.meta and import() without plugin ( #6962 )
...
The correct error was already thrown when they weren't in statement position.
2017-12-03 17:45:37 +01:00
Daniel Tschinder
ac72bfbd33
Update babylon to use unicode 10 ( #6958 )
2017-12-03 11:55:50 +01:00
Daniel Tschinder
de5ab72c49
Update flow to 0.59 and fix some flow issues ( #6957 )
2017-12-02 08:59:46 -05:00
Brian Ng
d8bbaaae0a
Split exportExtensions into exportDefault and exportNamespace plugins… ( #6920 )
...
* Split exportExtensions into two plugins in babylon
* rename proposal-export-default to proposal-export-default-from
* rename proposal-export-namespace to proposal-export-namespace-from
2017-11-30 17:46:36 -05:00
Martin McKeaveney
6d820a2757
removing expression field from ArrowFunctionExpression ( #6836 )
2017-11-23 22:12:13 +01:00
Gidi Meir Morris
edbf5d33dc
Fix "Better error messaging for unexpected tokens #6715 " ( #6875 )
2017-11-22 15:31:03 -06:00
Nicolò Ribaudo
464df13c69
Allow yielding an arrow function withour parens around the param ( #6877 )
2017-11-22 15:28:37 -06:00
Sven SAULEAU
bb89364813
Merge pull request #6727 from babel/feat-use-charcode-constants
...
[Babylon] Use char codes contants
2017-11-16 10:35:42 +01:00
Raja Sekar
63397d0aad
Better error message for super when not using an object method ( #6754 )
2017-11-15 21:29:46 -06:00
Brian Ng
0f2ab2fe20
Fix some reserved type handling and declare class with multiple extends ( #6725 )
2017-11-15 16:16:15 -06:00
Nicolò Ribaudo
9ae23639ad
Parse async arrows with flow type parameters ( #6802 )
...
Fixes #6712
2017-11-14 16:24:14 +01:00
Sven SAULEAU
186f04a3e9
feat: use charcodes in JSX plugin
2017-11-13 13:15:32 +01:00
Sven SAULEAU
097ff40001
feat: more charCodes
2017-11-11 18:08:43 +01:00
Logan Smyth
432a9b5092
Allow sourceType:unambiguous as a way to tell Babylon to guess the type. ( #6789 )
...
* Allow sourceType:unambiguous as a way to tell Babylon to guess the type.
* Update some docs.
2017-11-10 15:00:06 -08:00
Sven SAULEAU
b79e3c0e99
fix: minor changes
2017-11-09 18:07:10 +01:00
Sven SAULEAU
88c1b4ef1c
feat: more charcodes
2017-11-09 17:13:36 +01:00
Sven SAULEAU
cd8a869a18
fix: remove unwanted change
2017-11-08 13:20:11 +01:00