| 1 | "use strict";
|
|---|
| 2 |
|
|---|
| 3 | Object.defineProperty(exports, "__esModule", {
|
|---|
| 4 | value: true
|
|---|
| 5 | });
|
|---|
| 6 | exports.getTokLabels = getTokLabels;
|
|---|
| 7 | exports.getVisitorKeys = getVisitorKeys;
|
|---|
| 8 | const _ESLINT_VISITOR_KEYS = require("eslint-visitor-keys");
|
|---|
| 9 | const babel = require("./babel-core.cjs");
|
|---|
| 10 | const ESLINT_VISITOR_KEYS = _ESLINT_VISITOR_KEYS.KEYS;
|
|---|
| 11 | let visitorKeys;
|
|---|
| 12 | function getVisitorKeys() {
|
|---|
| 13 | if (!visitorKeys) {
|
|---|
| 14 | const newTypes = {
|
|---|
| 15 | ChainExpression: ESLINT_VISITOR_KEYS.ChainExpression,
|
|---|
| 16 | ImportExpression: ESLINT_VISITOR_KEYS.ImportExpression,
|
|---|
| 17 | Literal: ESLINT_VISITOR_KEYS.Literal,
|
|---|
| 18 | MethodDefinition: ["decorators"].concat(ESLINT_VISITOR_KEYS.MethodDefinition),
|
|---|
| 19 | Property: ["decorators"].concat(ESLINT_VISITOR_KEYS.Property),
|
|---|
| 20 | PropertyDefinition: ["decorators", "typeAnnotation"].concat(ESLINT_VISITOR_KEYS.PropertyDefinition)
|
|---|
| 21 | };
|
|---|
| 22 | const conflictTypes = {
|
|---|
| 23 | ExportAllDeclaration: ESLINT_VISITOR_KEYS.ExportAllDeclaration
|
|---|
| 24 | };
|
|---|
| 25 | visitorKeys = Object.assign({}, newTypes, babel.types.VISITOR_KEYS, conflictTypes, {
|
|---|
| 26 | ClassPrivateMethod: ["decorators"].concat(ESLINT_VISITOR_KEYS.MethodDefinition)
|
|---|
| 27 | });
|
|---|
| 28 | }
|
|---|
| 29 | return visitorKeys;
|
|---|
| 30 | }
|
|---|
| 31 | let tokLabels;
|
|---|
| 32 | function getTokLabels() {
|
|---|
| 33 | return tokLabels || (tokLabels = (p => p.reduce((o, [k, v]) => Object.assign({}, o, {
|
|---|
| 34 | [k]: v
|
|---|
| 35 | }), {}))((Object.entries || (o => Object.keys(o).map(k => [k, o[k]])))(babel.tokTypes).map(([key, tok]) => [key, tok.label])));
|
|---|
| 36 | }
|
|---|
| 37 |
|
|---|
| 38 | //# sourceMappingURL=ast-info.cjs.map
|
|---|