fix(@babel/parser): fix tokenizer context update code (#13422)

* fix(`@babel/parser`): fix `_function` update code

* fmt
This commit is contained in:
Eyoatam Tamirat 2021-06-08 15:26:50 +03:00 committed by GitHub
parent f6f37fb8cd
commit 56db172b0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -107,7 +107,7 @@ tt._function.updateContext = tt._class.updateContext = function (prevType) {
!(prevType === tt._return && this.hasPrecedingLineBreak()) && !(prevType === tt._return && this.hasPrecedingLineBreak()) &&
!( !(
(prevType === tt.colon || prevType === tt.braceL) && (prevType === tt.colon || prevType === tt.braceL) &&
this.curContext() === types.b_stat this.curContext() === types.braceStatement
) )
) { ) {
this.state.context.push(types.functionExpression); this.state.context.push(types.functionExpression);