Add @babel/helper-validator-identifier (#11289)

* refactor: replace esutils.keywords.isIdentifierNameES6 by helper-validator-identifier

* refactor: replace esutils isReservedWordES6 by isKeyword || isReservedWord

* address review comments

* chore: specify both “main” and “exports”

* build helper-validator-identifier before babel-types
This commit is contained in:
Huáng Jùnliàng
2020-03-20 07:23:14 -04:00
committed by GitHub
parent 693a5df7a9
commit e39b508030
21 changed files with 304 additions and 169 deletions

View File

@@ -163,6 +163,8 @@ export const types: { [name: string]: TokenType } = {
}),
// Keywords
// Don't forget to update packages/babel-helper-validator-identifier/src/keyword.js
// when new keywords are added
_break: createKeyword("break"),
_case: createKeyword("case", { beforeExpr }),
_catch: createKeyword("catch"),