File tree 1 file changed +6
-1
lines changed
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -163,6 +163,7 @@ export class CellParser extends Parser {
163
163
this . O_function = 0 ;
164
164
this . O_async = false ;
165
165
this . O_generator = false ;
166
+ this . O_destructuring = null ;
166
167
this . strict = true ;
167
168
this . enterScope ( SCOPE_FUNCTION | SCOPE_ASYNC | SCOPE_GENERATOR ) ;
168
169
@@ -179,7 +180,7 @@ export class CellParser extends Parser {
179
180
if ( token . type === tt . parenL ) {
180
181
id = this . parseParenAndDistinguishExpression ( true ) ;
181
182
if ( id . type !== "ArrowFunctionExpression" && this . eat ( tt . eq ) ) {
182
- id = this . toAssignable ( id , true ) ;
183
+ id = this . toAssignable ( id , true , this . O_destructuring ) ;
183
184
} else {
184
185
body = id ;
185
186
id = null ;
@@ -241,6 +242,10 @@ export class CellParser extends Parser {
241
242
? node
242
243
: super . toAssignable ( node , isBinding , refDestructuringErrors ) ;
243
244
}
245
+ checkExpressionErrors ( refDestructuringErrors , andThrow ) {
246
+ this . O_destructuring = refDestructuringErrors ;
247
+ return super . checkExpressionErrors ( refDestructuringErrors , andThrow ) ;
248
+ }
244
249
checkUnreserved ( node ) {
245
250
if ( node . name === "viewof" || node . name === "mutable" ) {
246
251
this . raise ( node . start , `Unexpected keyword '${ node . name } '` ) ;
You can’t perform that action at this time.
0 commit comments