Daniel Tschinder
ae154c86ed
perf: Minor optimizations
2019-01-17 16:14:53 -08:00
Nicolò Ribaudo
0a88230ec4
Disallow async functions as loop bodies ( #9314 )
2019-01-17 17:07:48 -05:00
Brian Ng
aaec2cd51d
Fix handling newline with TypeScript declare and abstract classes ( #9328 )
2019-01-15 06:56:52 -06:00
Brian Ng
34c9890f41
Fix range on TypeScript index signature parameters ( #9335 )
2019-01-15 06:52:33 -06:00
Armano
e8038863c3
Fix range on TypeScript this type predicate ( #9339 )
2019-01-15 10:35:49 +01:00
Nicolò Ribaudo
694e3fd8cf
Merge declaration and init of props in parser's state ( #9312 )
...
* Merge declaration and init of props in parser's state
* Move type def
2019-01-13 23:54:44 +01:00
Nicolò Ribaudo
3e4b608a80
Parse class heritage as strict mode code ( #9315 )
2019-01-12 14:54:23 +01:00
Nicolò Ribaudo
5889620a6a
Disallow new import(x) and import(x,) ( #9313 )
...
* Disallow "new import(...)"
* Disallow trailing comma inside dynamic import
* Rename test
* Update error message
2019-01-11 18:59:51 +01:00
Nicolò Ribaudo
9764718c32
Disallow trailing comma after rest ( #9311 )
...
* Add new tests
* Use state instead of param and disallow comma in [...a,]=[]
* Unify error messages
* Object destructuring
* Update whitelist
2019-01-11 13:08:38 +01:00
Armano
2cc0376756
@babel/parser(ts): Add parsing of type import ( #9302 )
2019-01-10 11:14:48 -05:00
Armano
46e3f6df1f
@babel/parser: include leading character into range of generic ArrowFunctionExpression ( #9295 )
2019-01-08 07:19:55 -06:00
Brian Ng
03022d169e
Throw error if TypeScript class has empty implements ( #9292 )
2019-01-07 15:27:27 -06:00
Daniel Tschinder
e43777bb5f
Fix location for typescript type assertions in AST ( #9284 )
2019-01-06 16:39:14 -08:00
Brian Ng
a58893d1e3
Ensure modifiers are included in TSParameterProperty ranges ( #9276 )
2019-01-04 10:02:09 -06:00
J. S. Choi
c586d4e8ca
parser, smart pipes: Add support for yield in pipeline bodies
...
Fixes #9178 .
2018-12-23 17:09:18 +01:00
J. S. Choi
60ffe1d103
parser, smart pipes: Add test for async–await
2018-12-23 17:09:18 +01:00
Armano
b5177ce290
babel-parser: typescript: add missing bigint keyword ( #9230 )
2018-12-22 17:18:32 -06:00
Nicolò Ribaudo
0bb720401b
v7.2.3
2018-12-20 12:18:31 +01:00
Daniel Tschinder
5cb38995c0
Allow keywords to be used in type annotations ( #9184 )
2018-12-15 12:51:24 -08:00
Nicolò Ribaudo
c1499b13ac
v7.2.2
2018-12-15 10:59:56 +01:00
Vikram Rangaraj
72471aff63
Handle flow comments with leading spaces ( #9168 )
...
* check for spaces and tabs before a flow comment
* fix issue with using string index and shift interchangably
* update tests
* Use update charcodes version
* Disallow flow-comments in flow-comments and check for unterminated comments
2018-12-13 22:10:01 -08:00
Daniel Tschinder
4ca35ef8b9
Fix running flow on travis and update flow ( #9128 )
...
* Fix running flow on travis and update flow
- ensure bootstrap is run before running flow as we need some generated files for correctly doing typechecks
- ensure that we only ignore the build directory inside the babel folder as currently we ignore everything because travis checks out into ‘/home/travis/build/’
* Fix all flow errors
2018-12-05 12:30:30 -08:00
Nicolò Ribaudo
282129ea66
v7.2.0
2018-12-03 20:00:35 +01:00
Sven Sauleau
fdc869ce16
Merge pull request #8289 from valtech-nyc/implement-smart-pipeline-in-parser
...
Implement Smart Pipeline proposal in @babel/parser
2018-12-03 19:28:45 +01:00
Daniel Tschinder
fa9df678ac
Move tests from babylon to babel-parser and enable one test that works now
2018-12-03 00:46:54 -08:00
Daniel Tschinder
3932830535
Parse non-octals with leading zeros in non strict mode correctly ( #9114 )
...
* Parse non-octals with leading zeros in non strict mode correctly
* Better error message
2018-12-03 00:04:37 -08:00
Daniel Tschinder
07eaa3c63f
Ignore empty fixture directories and fix fixtures in the parser ( #9113 )
...
* Ignore fixture directories that do not contain input or exec
* Fix parser test fixtures structures for some imported esprima tests.
* Warn on test folders that are not empty and do not contain testfiles
2018-12-02 22:55:06 -08:00
Nicolò Ribaudo
61f2aed5b0
Disallow await inside arrow functions ( #9074 )
...
* Disallow await inside arrow functions
* Update test262 whitelist
2018-11-26 12:43:04 +01:00
Nicolò Ribaudo
856edbf95f
[flow] Allow type casts in array patterns inside arrow parameters ( #9069 )
2018-11-24 12:23:49 +01:00
mAAdhaTTah
100b38784d
Replace else with fall through
2018-11-21 21:07:03 -05:00
mAAdhaTTah
4cbd22a15f
Hardcode "#" in error message
...
It's not going to be anything else...
2018-11-21 21:05:51 -05:00
Daniel Tschinder
d2971a1959
Fix compatibility between typescript and jsx plugins in interface declarations ( #9058 )
2018-11-21 15:58:50 -08:00
Brian Ng
4f16a12c03
Fix bug with parsing TS generic async arrow function ( #9055 )
2018-11-21 15:34:09 -06:00
Brian Ng
e7f0c065cf
Bump some deps ( #9056 )
2018-11-21 15:21:36 -06:00
mAAdhaTTah
70318c9413
s/may/should
2018-11-21 16:02:34 -05:00
mAAdhaTTah
6e84352b51
PrimaryTopicReference -> PipelinePrimaryTopicReference
2018-11-21 15:54:56 -05:00
mAAdhaTTah
0eb9b2463d
Move plugin check to pipeline op appearance
...
No need to recheck it throughout then.
2018-11-21 15:54:26 -05:00
Grigory Moroz
445b14148e
Better error for disallowed trailing commas/parameters after rest elements ( #9046 )
...
* handle disordered rest parameter in function expressions
* remove spaces [lint]
* polish function parameters validation
* add test with arrow function and comma after rest parameter [babel-parser]
2018-11-21 07:49:36 +01:00
Daniel Tschinder
a2afb974be
Fix parsing typescript function types with destructuring ( #9035 )
...
* Fix parsing typescript function types with destructuring
* Use integer instead of actual stack
2018-11-19 13:55:58 -08:00
Nicolò Ribaudo
4e1d6e7ff4
v7.1.6
2018-11-13 22:10:06 +01:00
Brian Ng
4f206b2416
prettier@1.15.1 ( #9001 )
2018-11-09 15:25:13 -06:00
Daniel Tschinder
343f776ca5
Rename primitive types to reserved types ( #8984 )
2018-11-07 16:50:36 -06:00
Daniel Tschinder
5d5cd8612f
Fix several edge cases with context expression state ( #8972 )
...
* Fix several edge cases with context expression state
* Fix review comments
* Remove unused field
2018-11-06 19:37:24 -08:00
Henry Zhu
afe67a7035
v7.1.5
2018-11-06 17:21:22 -05:00
Nicolò Ribaudo
2fa1984635
Fix await in function name and parameters ( #7727 )
...
* Disallow await in function parameters
* Fix await as function name
* Update test whitelists
2018-11-06 08:30:06 +01:00
Retsam
2194842d11
Typescript: Validate tuple type element positions ( #8828 )
...
* feat: validate the positions of rest elements and optional elements in tuple types
Adds a validation step to the parser which raises syntax errors if a rest param is not at the end of a tuple, or if a mandatory param follows an optional parameter
* Fix spread after optional case; add test case
2018-11-05 23:19:34 -08:00
Daniel Tschinder
e3b2c1afff
fix: Do not allow TypeCastExpressions w/o parens ( #8956 )
2018-11-05 15:34:24 -08:00
Nicolò Ribaudo
24c4901ff5
Remove Babylon plugins for features already merged to the ECMAScript spec ( #8448 )
...
These are now enabled by default:
- objectRestSpread (2018)
- asyncGenerators (2018)
- optionalCatchBInding (2019)
- jsonStrings (2019)
TODO (after this commit):
- [ ] Deprecate the `@babel/plugin-syntax-*` packages.
- [ ] Deprecate the `@babel/plugin-proposal-*` packages.
- [ ] Create the `@babel/plugin-transform-*` packages.
2018-11-05 23:48:06 +01:00
Jordan Brown
f216a7b06f
[flow] Add support for parsing _ as implicit instantiation in call/new ( #8883 )
...
* [flow] Add support for parsing as implicit instantiation in call/new
* Update flow tests and fix underscore being a reserved type
* Rebase onto flow-test
* Fix flow commit hash
2018-11-05 10:45:40 -08:00
mAAdhaTTah
a0e94ec24d
Move PipelineStyle to types.js file
2018-11-03 14:03:17 -04:00