Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
ruleset: function () {
var selectors = [], s, rules, match, memo = i;
if (match = peek(/([a-z.#: _-]+)[\s\n]*\{/g)) {
i += match[0].length - 1;
selectors = [new(tree.Selector)([new(tree.Element)(null, match[1])])];
} else {
while (s = $(this.selector)) {
selectors.push(s);
if (! $(',')) { break }
}
if (s) $(this.comment);
}
if (selectors.length > 0 && (rules = $(this.block))) {
return new(tree.Ruleset)(selectors, rules);
} else {
// Backtrack
furthest = i;
i = memo;
}
},
ruleset: function () {
var selectors = [], s, rules, match, memo = i;
if (match = peek(/([a-z.#: _-]+)[\s\n]*\{/g)) {
i += match[0].length - 1;
selectors = [new(tree.Selector)([new(tree.Element)(null, match[1])])];
} else {
while (s = $(this.selector)) {
selectors.push(s);
if (! $(',')) { break }
}
if (s) $(this.comment);
}
if (selectors.length > 0 && (rules = $(this.block))) {
return new(tree.Ruleset)(selectors, rules);
} else {
// Backtrack
furthest = i;
i = memo;
}
},
ruleset: function () {
var selectors = [], s, rules, match, memo = i;
if (match = peek(/([a-z.#: _-]+)[\s\n]*\{/g)) {
i += match[0].length - 1;
selectors = [new(tree.Selector)([new(tree.Element)(null, match[1])])];
} else {
while (s = $(this.selector)) {
selectors.push(s);
if (! $(',')) { break }
}
if (s) $(this.comment);
}
if (selectors.length > 0 && (rules = $(this.block))) {
return new(tree.Ruleset)(selectors, rules);
} else {
// Backtrack
furthest = i;
i = memo;
}
},
tree.mixin.Definition = function MixinDefinition(name, params, rules) {
this.name = name;
this.selectors = [new(tree.Selector)([new(tree.Element)(null, name)])];
this.params = params;
this.arity = params.length;
this.rules = rules;
this._lookups = {};
this.required = params.reduce(function (count, p) {
if (p.name && !p.value) { return count + 1 }
else { return count }
}, 0);
};
tree.mixin.Definition.prototype = {
tree.mixin.Definition = function MixinDefinition(name, params, rules) {
this.name = name;
this.selectors = [new(tree.Selector)([new(tree.Element)(null, name)])];
this.params = params;
this.arity = params.length;
this.rules = rules;
this._lookups = {};
this.required = params.reduce(function (count, p) {
if (p.name && !p.value) { return count + 1 }
else { return count }
}, 0);
};
tree.mixin.Definition.prototype = {
tree.mixin.Definition = function MixinDefinition(name, params, rules) {
this.name = name;
this.selectors = [new(tree.Selector)([new(tree.Element)(null, name)])];
this.params = params;
this.arity = params.length;
this.rules = rules;
this._lookups = {};
this.required = params.reduce(function (count, p) {
if (p.name && !p.value) { return count + 1 }
else { return count }
}, 0);
};
tree.mixin.Definition.prototype = {
call: function () {
var elements = [], e, c, args, index = i;
while (e = $(/[#.][a-zA-Z0-9_-]+/g)) {
elements.push(new(tree.Element)(c, e));
c = $('>');
}
$('(') && (args = $(this.entities.arguments)) && $(')');
if (elements.length > 0 && ($(';') || peek('}'))) {
return new(tree.mixin.Call)(elements, args, index);
}
},
element: function () {
var e, t;
c = $(this.combinator);
e = $(/[.#:]?[a-zA-Z0-9_-]+/g) || $('*') || $(this.attribute) || $(/\([^)@]+\)/g);
if (e) { return new(tree.Element)(c, e) }
},
element: function () {
var e, t;
c = $(this.combinator);
e = $(/[.#:]?[a-zA-Z0-9_-]+/g) || $('*') || $(this.attribute) || $(/\([^)@]+\)/g);
if (e) { return new(tree.Element)(c, e) }
},
call: function () {
var elements = [], e, c, args, index = i;
while (e = $(/[#.][a-zA-Z0-9_-]+/g)) {
elements.push(new(tree.Element)(c, e));
c = $('>');
}
$('(') && (args = $(this.entities.arguments)) && $(')');
if (elements.length > 0 && ($(';') || peek('}'))) {
return new(tree.mixin.Call)(elements, args, index);
}
},