/
proc
/
self
/
root
/
home
/
henzagold
/
oldsite
/
node_modules
/
@babel
/
traverse
/
lib
/
scope
/
File Upload :
llllll
Current File: //proc/self/root/home/henzagold/oldsite/node_modules/@babel/traverse/lib/scope/binding.js.map
{"version":3,"names":["Binding","constructor","identifier","scope","path","kind","constantViolations","constant","referencePaths","referenced","references","clearValue","deoptValue","hasDeoptedValue","setValue","value","hasValue","reassign","indexOf","push","reference","dereference"],"sources":["../../src/scope/binding.ts"],"sourcesContent":["import type NodePath from \"../path\";\nimport type * as t from \"@babel/types\";\nimport type Scope from \"./index\";\n\nexport type BindingKind =\n | \"var\" /* var declarator */\n | \"let\" /* let declarator, class declaration id, catch clause parameters */\n | \"const\" /* const declarator */\n | \"module\" /* import specifiers */\n | \"hoisted\" /* function declaration id */\n | \"param\" /* function declaration parameters */\n | \"local\" /* function expression id, class expression id */\n | \"unknown\"; /* export specifiers */\n/**\n * This class is responsible for a binding inside of a scope.\n *\n * It tracks the following:\n *\n * * Node path.\n * * Amount of times referenced by other nodes.\n * * Paths to nodes that reassign or modify this binding.\n * * The kind of binding. (Is it a parameter, declaration etc)\n */\n\nexport default class Binding {\n identifier: t.Identifier;\n scope: Scope;\n path: NodePath;\n kind: BindingKind;\n\n constructor({\n identifier,\n scope,\n path,\n kind,\n }: {\n identifier: t.Identifier;\n scope: Scope;\n path: NodePath;\n kind: BindingKind;\n }) {\n this.identifier = identifier;\n this.scope = scope;\n this.path = path;\n this.kind = kind;\n\n this.clearValue();\n }\n\n constantViolations: Array<NodePath> = [];\n constant: boolean = true;\n\n referencePaths: Array<NodePath> = [];\n referenced: boolean = false;\n references: number = 0;\n\n declare hasDeoptedValue: boolean;\n declare hasValue: boolean;\n declare value: any;\n\n deoptValue() {\n this.clearValue();\n this.hasDeoptedValue = true;\n }\n\n setValue(value: any) {\n if (this.hasDeoptedValue) return;\n this.hasValue = true;\n this.value = value;\n }\n\n clearValue() {\n this.hasDeoptedValue = false;\n this.hasValue = false;\n this.value = null;\n }\n\n /**\n * Register a constant violation with the provided `path`.\n */\n\n reassign(path: NodePath) {\n this.constant = false;\n if (this.constantViolations.indexOf(path) !== -1) {\n return;\n }\n this.constantViolations.push(path);\n }\n\n /**\n * Increment the amount of references to this binding.\n */\n\n reference(path: NodePath) {\n if (this.referencePaths.indexOf(path) !== -1) {\n return;\n }\n this.referenced = true;\n this.references++;\n this.referencePaths.push(path);\n }\n\n /**\n * Decrement the amount of references to this binding.\n */\n\n dereference() {\n this.references--;\n this.referenced = !!this.references;\n }\n}\n"],"mappings":";;;;;;;AAwBe,MAAMA,OAAN,CAAc;EAM3BC,WAAW,CAAC;IACVC,UADU;IAEVC,KAFU;IAGVC,IAHU;IAIVC;EAJU,CAAD,EAUR;IAAA,KAfHH,UAeG;IAAA,KAdHC,KAcG;IAAA,KAbHC,IAaG;IAAA,KAZHC,IAYG;IAAA,KASHC,kBATG,GASmC,EATnC;IAAA,KAUHC,QAVG,GAUiB,IAVjB;IAAA,KAYHC,cAZG,GAY+B,EAZ/B;IAAA,KAaHC,UAbG,GAamB,KAbnB;IAAA,KAcHC,UAdG,GAckB,CAdlB;IACD,KAAKR,UAAL,GAAkBA,UAAlB;IACA,KAAKC,KAAL,GAAaA,KAAb;IACA,KAAKC,IAAL,GAAYA,IAAZ;IACA,KAAKC,IAAL,GAAYA,IAAZ;IAEA,KAAKM,UAAL;EACD;;EAaDC,UAAU,GAAG;IACX,KAAKD,UAAL;IACA,KAAKE,eAAL,GAAuB,IAAvB;EACD;;EAEDC,QAAQ,CAACC,KAAD,EAAa;IACnB,IAAI,KAAKF,eAAT,EAA0B;IAC1B,KAAKG,QAAL,GAAgB,IAAhB;IACA,KAAKD,KAAL,GAAaA,KAAb;EACD;;EAEDJ,UAAU,GAAG;IACX,KAAKE,eAAL,GAAuB,KAAvB;IACA,KAAKG,QAAL,GAAgB,KAAhB;IACA,KAAKD,KAAL,GAAa,IAAb;EACD;;EAMDE,QAAQ,CAACb,IAAD,EAAiB;IACvB,KAAKG,QAAL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