Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
throw err
}
// Evaluate imported "root"
block.parent = this.root
block.scope = false
var ret = this.visit(block)
importStack.pop()
if (importStack.length || index) this.paths.pop()
return ret
}
function EnhancedEvaluator(root, optios) {
Evaluator.apply(this, arguments)
}
EnhancedEvaluator.prototype = Object.create(Evaluator.prototype)
EnhancedEvaluator.prototype.constructor = EnhancedEvaluator
EnhancedEvaluator.prototype.visitImport = function(imported) {
this.return++
var path = this.visit(imported.path).first,
nodeName = imported.once ? "require" : "import",
found,
literal,
index
this.return--
// url() passed
if ("url" == path.name) {
if (imported.once) throw new Error("You cannot @require a url")
block.parent = this.root;
block.scope = false;
var ret = this.visit(block);
importStack.pop();
if (importStack.length || index) this.paths.pop();
return ret;
}
function CachedPathEvaluator(root, options) {
Evaluator.apply(this, arguments);
this.cache = options.cache;
}
CachedPathEvaluator.prototype = Object.create(Evaluator.prototype);
CachedPathEvaluator.prototype.constructor = CachedPathEvaluator;
CachedPathEvaluator.prototype.visitImport = function(imported) {
this.return++;
var path = this.visit(imported.path).first
, nodeName = imported.once ? 'require' : 'import'
, found
, literal
, index;
this.return--;
// debug('import %s', path);
// url() passed
if ('url' == path.name) {