Skip to content

Commit

Permalink
fix(@babel/parser): fix tokenizer context update code (#13422)
Browse files Browse the repository at this point in the history
* fix(`@babel/parser`): fix `_function` update code

* fmt
  • Loading branch information
Eyoatam Tamirat committed Jun 8, 2021
1 parent f6f37fb commit 56db172
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/babel-parser/src/tokenizer/context.js
Expand Up @@ -107,7 +107,7 @@ tt._function.updateContext = tt._class.updateContext = function (prevType) {
!(prevType === tt._return && this.hasPrecedingLineBreak()) &&
!(
(prevType === tt.colon || prevType === tt.braceL) &&
this.curContext() === types.b_stat
this.curContext() === types.braceStatement
)
) {
this.state.context.push(types.functionExpression);
Expand Down

0 comments on commit 56db172

Please sign in to comment.