This commit is contained in:
Matthew Dean
2018-06-16 11:59:18 -07:00
committed by GitHub
parent 0de99e9c21
commit 468b532885
2 changed files with 32 additions and 15 deletions

View File

@@ -349,21 +349,25 @@ Ruleset.prototype.parseValue = function(toParse) {
var self = this;
function transformDeclaration(decl) {
if (decl.value instanceof Anonymous && !decl.parsed) {
this.parse.parseNode(
decl.value.value,
["value", "important"],
decl.value.getIndex(),
decl.fileInfo(),
function(err, result) {
if (err) {
decl.parsed = true;
}
if (result) {
decl.value = result[0];
decl.important = result[1] || '';
decl.parsed = true;
}
});
if (typeof decl.value.value === "string") {
this.parse.parseNode(
decl.value.value,
["value", "important"],
decl.value.getIndex(),
decl.fileInfo(),
function(err, result) {
if (err) {
decl.parsed = true;
}
if (result) {
decl.value = result[0];
decl.important = result[1] || '';
decl.parsed = true;
}
});
} else {
decl.parsed = true;
}
return decl;
}

View File

@@ -1,4 +1,17 @@
// test late parsing
@cols: 1, 2;
.a(@i: length(@cols)) when (@i > 0) {
@divider: e(extract(@cols, @i));
}
.a;
.b(@j: 1) when (@j < length(@cols)) {
@divider: e(extract(@cols, @j));
}
.b;
// simple array/list:
.multiunit {