UNPKG

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