identifier.js 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.canBeReservedWord = canBeReservedWord;
  6. Object.defineProperty(exports, "isIdentifierChar", {
  7. enumerable: true,
  8. get: function () {
  9. return _helperValidatorIdentifier.isIdentifierChar;
  10. }
  11. });
  12. Object.defineProperty(exports, "isIdentifierStart", {
  13. enumerable: true,
  14. get: function () {
  15. return _helperValidatorIdentifier.isIdentifierStart;
  16. }
  17. });
  18. exports.isIteratorStart = isIteratorStart;
  19. Object.defineProperty(exports, "isKeyword", {
  20. enumerable: true,
  21. get: function () {
  22. return _helperValidatorIdentifier.isKeyword;
  23. }
  24. });
  25. Object.defineProperty(exports, "isReservedWord", {
  26. enumerable: true,
  27. get: function () {
  28. return _helperValidatorIdentifier.isReservedWord;
  29. }
  30. });
  31. Object.defineProperty(exports, "isStrictBindOnlyReservedWord", {
  32. enumerable: true,
  33. get: function () {
  34. return _helperValidatorIdentifier.isStrictBindOnlyReservedWord;
  35. }
  36. });
  37. Object.defineProperty(exports, "isStrictBindReservedWord", {
  38. enumerable: true,
  39. get: function () {
  40. return _helperValidatorIdentifier.isStrictBindReservedWord;
  41. }
  42. });
  43. Object.defineProperty(exports, "isStrictReservedWord", {
  44. enumerable: true,
  45. get: function () {
  46. return _helperValidatorIdentifier.isStrictReservedWord;
  47. }
  48. });
  49. exports.keywordRelationalOperator = void 0;
  50. var _helperValidatorIdentifier = require("@babel/helper-validator-identifier");
  51. const keywordRelationalOperator = /^in(stanceof)?$/;
  52. exports.keywordRelationalOperator = keywordRelationalOperator;
  53. function isIteratorStart(current, next, next2) {
  54. return current === 64 && next === 64 && (0, _helperValidatorIdentifier.isIdentifierStart)(next2);
  55. }
  56. const reservedWordLikeSet = new Set(["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete", "implements", "interface", "let", "package", "private", "protected", "public", "static", "yield", "eval", "arguments", "enum", "await"]);
  57. function canBeReservedWord(word) {
  58. return reservedWordLikeSet.has(word);
  59. }
  60. //# sourceMappingURL=identifier.js.map