Partial Application Syntax: Stage 1 (#9343)

* add partial application syntax and some tests

* remove unnecessary error message and hasPartial function from parseNewArguments

* add types for PartialExpression

* Update the tests

* rename PartialExpression to Partial

* move Partial from expressions to types and rename to ArgumentPlaceholder

* add tests for ArgumentPlaceholder in babel-generator

* rename Partial to ArgumentPlaceholder

* update the tests

* remove alias from the type and undo changes in generated folder

* adds a nice error message

* better definition for the type

* auto-generated files

* update the conditional for allowPlaceholder message and tests

* update CallExpression definition to accept ArgumentPlaceholder

* change description

* clean up

* indent ArgumentPlaceholder entry and revert unwanted changes
This commit is contained in:
Behrang Yarahmadi
2019-01-14 17:54:21 +01:00
committed by Nicolò Ribaudo
parent 37a427f692
commit c60c4dd375
39 changed files with 1323 additions and 2 deletions

View File

@@ -72,6 +72,7 @@ These are the core @babel/parser (babylon) AST node types.
- [LogicalExpression](#logicalexpression)
- [LogicalOperator](#logicaloperator)
- [SpreadElement](#spreadelement)
- [ArgumentPlaceholder](#argumentplaceholder)
- [MemberExpression](#memberexpression)
- [BindExpression](#bindexpression)
- [ConditionalExpression](#conditionalexpression)
@@ -862,6 +863,14 @@ interface SpreadElement <: Node {
}
```
### ArgumentPlaceholder
```js
interface ArgumentPlaceholder <: Node {
type: "ArgumentPlaceholder";
}
```
### MemberExpression
```js