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
@@ -19,6 +19,7 @@ export type Options = {
|
||||
strictMode: ?boolean,
|
||||
ranges: boolean,
|
||||
tokens: boolean,
|
||||
createParenthesizedExpressions: boolean,
|
||||
};
|
||||
|
||||
export const defaultOptions: Options = {
|
||||
@@ -55,6 +56,9 @@ export const defaultOptions: Options = {
|
||||
ranges: false,
|
||||
// Adds all parsed tokens to a `tokens` property on the `File` node
|
||||
tokens: false,
|
||||
// Whether to create ParenthesizedExpression AST nodes (if false
|
||||
// the parser sets extra.parenthesized on the expression nodes instead).
|
||||
createParenthesizedExpressions: false,
|
||||
};
|
||||
|
||||
// Interpret and default an options object
|
||||
|
||||
Reference in New Issue
Block a user