v8intrinsic.js 931 B

1234567891011121314151617181920212223242526272829303132
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = void 0;
  6. var _types = require("../tokenizer/types");
  7. var _default = superClass => class V8IntrinsicMixin extends superClass {
  8. parseV8Intrinsic() {
  9. if (this.match(54)) {
  10. const v8IntrinsicStartLoc = this.state.startLoc;
  11. const node = this.startNode();
  12. this.next();
  13. if ((0, _types.tokenIsIdentifier)(this.state.type)) {
  14. const name = this.parseIdentifierName();
  15. const identifier = this.createIdentifier(node, name);
  16. identifier.type = "V8IntrinsicIdentifier";
  17. if (this.match(10)) {
  18. return identifier;
  19. }
  20. }
  21. this.unexpected(v8IntrinsicStartLoc);
  22. }
  23. }
  24. parseExprAtom(refExpressionErrors) {
  25. return this.parseV8Intrinsic() || super.parseExprAtom(refExpressionErrors);
  26. }
  27. };
  28. exports.default = _default;
  29. //# sourceMappingURL=v8intrinsic.js.map