3 tree.Selector = function (elements) {
4 this.elements = elements;
5 if (this.elements[0].combinator.value === "") {
6 this.elements[0].combinator.value = ' ';
9 tree.Selector.prototype.match = function (other) {
10 var value = this.elements[0].value,
11 len = this.elements.length,
12 olen = other.elements.length;
15 return value === other.elements[0].value;
18 for (var i = 0; i < olen; i ++) {
19 if (value === other.elements[i].value) {
20 for (var j = 1; j < len; j ++) {
21 if (this.elements[j].value !== other.elements[i + j].value) {
30 tree.Selector.prototype.toCSS = function (env) {
31 if (this._css) { return this._css }
33 return this._css = this.elements.map(function (e) {
34 if (typeof(e) === 'string') {
35 return ' ' + e.trim();
42 })(require('less/tree'));