refactored rule() cause the closure slows things down too much for some reason
This commit is contained in:
parent
215ef05907
commit
f973deec28
@ -657,17 +657,17 @@ less.parser = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
rule: function () {
|
rule: function () {
|
||||||
|
var value;
|
||||||
|
|
||||||
if (name = $(this.property) || $(this.variable)) {
|
if (name = $(this.property) || $(this.variable)) {
|
||||||
value = (function (that) {
|
if ((name[0] != '@') && (match = peek(/([^@+\/*(;{}-]*);/g))) {
|
||||||
if ((name[0] != '@') && (match = peek(/([^@+\/*(;{}-]*);/g))) {
|
i += match[0].length - 1;
|
||||||
i += match[0].length - 1;
|
value = match[1];
|
||||||
return match[1];
|
} else if (name === "font") {
|
||||||
} else if (name === "font") {
|
value = $(this.font);
|
||||||
return $(that.font);
|
} else {
|
||||||
} else {
|
value = $(this.value);
|
||||||
return $(that.value);
|
}
|
||||||
}
|
|
||||||
})(this);
|
|
||||||
|
|
||||||
if ($(this.end)) {
|
if ($(this.end)) {
|
||||||
return new(tree.Rule)(name, value);
|
return new(tree.Rule)(name, value);
|
||||||
|
Loading…
Reference in New Issue
Block a user