fix: allow shebang directive (#9922)
* fix: allow shebang directive * Update packages/babel-parser/src/plugins/flow.js * chore: prettier
This commit is contained in:
committed by
Nicolò Ribaudo
parent
9e9b62f77a
commit
354666aa17
@@ -96,7 +96,11 @@ export default (superClass: Class<Parser>): Class<Parser> =>
|
||||
}
|
||||
|
||||
finishToken(type: TokenType, val: any): void {
|
||||
if (!(type === tt.string || type === tt.semi)) {
|
||||
if (
|
||||
type !== tt.string &&
|
||||
type !== tt.semi &&
|
||||
type !== tt.interpreterDirective
|
||||
) {
|
||||
if (this.flowPragma === undefined) {
|
||||
this.flowPragma = null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user