Innovenergy_trunk/frontend/node_modules/@babel/traverse/lib/path/index.js.map

1 line
15 KiB
Plaintext
Raw Normal View History

{"version":3,"names":["validate","debug","buildDebug","REMOVED","SHOULD_STOP","SHOULD_SKIP","NodePath","constructor","hub","parent","contexts","state","opts","_traverseFlags","skipKeys","parentPath","container","listKey","key","node","type","data","context","scope","get","Error","targetNode","paths","pathCache","Map","set","path","setup","getScope","isScope","Scope","setData","val","Object","create","getData","def","undefined","hasNode","buildCodeFrameError","msg","SyntaxError","buildError","traverse","visitor","getPathLocation","parts","inList","unshift","join","message","enabled","toString","generator","code","parentKey","shouldSkip","v","shouldStop","removed","assign","prototype","NodePath_ancestry","NodePath_inference","NodePath_replacement","NodePath_evaluation","NodePath_conversion","NodePath_introspection","NodePath_context","NodePath_removal","NodePath_modification","NodePath_family","NodePath_comments","_guessExecutionStatusRelativeToDifferentFunctions","_guessExecutionStatusRelativeTo","t","TYPES","typeKey","fn","TypeError","NodePath_virtual_types_validator","keys","virtualTypes","includes","push"],"sources":["../../src/path/index.ts"],"sourcesContent":["import type { HubInterface } from \"../hub\";\nimport type TraversalContext from \"../context\";\nimport * as virtualTypes from \"./lib/virtual-types\";\nimport buildDebug from \"debug\";\nimport traverse from \"../index\";\nimport type { Visitor } from \"../types\";\nimport Scope from \"../scope\";\nimport { validate } from \"@babel/types\";\nimport * as t from \"@babel/types\";\nimport { path as pathCache } from \"../cache\";\nimport generator from \"@babel/generator\";\n\n// NodePath is split across many files.\nimport * as NodePath_ancestry from \"./ancestry\";\nimport * as NodePath_inference from \"./inference\";\nimport * as NodePath_replacement from \"./replacement\";\nimport * as NodePath_evaluation from \"./evaluation\";\nimport * as NodePath_conversion from \"./conversion\";\nimport * as NodePath_introspection from \"./introspection\";\nimport * as NodePath_context from \"./context\";\nimport * as NodePath_removal from \"./removal\";\nimport * as NodePath_modification from \"./modification\";\nimport * as NodePath_family from \"./family\";\nimport * as NodePath_comments from \"./comments\";\nimport * as NodePath_virtual_types_validator from \"./lib/virtual-types-validator\";\nimport type { NodePathAssertions } from \"./generated/asserts\";\nimport type { NodePathValidators } from \"./generated/validators\";\n\nconst debug = buildDebug(\"babel\");\n\nexport const REMOVED = 1 << 0;\nexport const SHOULD_STOP = 1 << 1;\nexport const SHOULD_SKIP = 1 << 2;\n\nclass NodePath<T extends t.Node = t.Node> {\n constructor(hub: HubInterface, parent: t.ParentMaps[T[\"type\"]]) {\n this.parent = parent;\n this.hub = hub;\n this.data = null;\n\n this.context = null;\n this.scope = null;\n }\n\n declare parent: t.ParentMaps[T[\"type\"]];\n declare hub: HubInterface;\n declare data: Record<string | symbol, unknown>;\n // TraversalContext is configured by setContext\n declare context: TraversalContext;\n declare scope: Scope;\n\n contexts: Array<TraversalContext> = [];\n state: any = null;\n opts: any = null;\n // this.shouldSkip = false; this.shouldStop = false; this.removed = false;\n _traverseFlags: number = 0;\n skipKeys: any = null;\n parentPath: t.ParentMaps[T[\"type\"]] extends null\n ? null\n : NodePath<t.ParentMaps[T[\"type\"]]> | null = null;\n container: t.Node | Array<t.Node> | null = null;\n listKey: string | null = null;\n key: string | number | null = null;\n node: T = null;\n type: T[\"type\"] | null = null;\n\n static get({\n hub,\n parentPath,\n parent,\n container,\n listKey,\n key,\n }: {\n hub?: HubInterface;\n parentPath: NodePath | null;\n parent: t.Node;\n container: t.Node | t.Node[];\n listKey?: string;\n key: string | number;\n }): NodePath {\n if (!hub && parentPath) {\n hub = parentPath.hub;\n }\n\n if (!parent) {\n throw new Error(\"To get a