Parenthesized expressions (#8025)
* Add parser createParenthesizedExpressions option … When set to `true` we create `ParenthesizedExpression` nodes instead of setting `extra.parenthesized`. * Also update babel-parser.d.ts
This commit is contained in:
committed by
Justin Ridgewell
parent
417e72ebfd
commit
dd8b700a2c
@@ -78,6 +78,7 @@ These are the core @babel/parser (babylon) AST node types.
|
||||
- [CallExpression](#callexpression)
|
||||
- [NewExpression](#newexpression)
|
||||
- [SequenceExpression](#sequenceexpression)
|
||||
- [ParenthesizedExpression](#parenthesizedexpression)
|
||||
- [DoExpression](#doexpression)
|
||||
- [Template Literals](#template-literals)
|
||||
- [TemplateLiteral](#templateliteral)
|
||||
@@ -936,6 +937,17 @@ interface SequenceExpression <: Expression {
|
||||
|
||||
A sequence expression, i.e., a comma-separated sequence of expressions.
|
||||
|
||||
## ParenthesizedExpression
|
||||
|
||||
```js
|
||||
interface ParenthesizedExpression <: Expression {
|
||||
type "ParenthesizedExpression";
|
||||
expression: Expression;
|
||||
}
|
||||
```
|
||||
|
||||
An expression wrapped by parentheses.
|
||||
|
||||
## DoExpression
|
||||
|
||||
```js
|
||||
|
||||
Reference in New Issue
Block a user