Commit bfb7afa2 by Aaron Leung

Working on mixin expansion and emission.

parent a5365756
......@@ -340,10 +340,10 @@ namespace Sass {
}
else if (peek< include >(position)) {
Node call(parse_mixin_call());
root << call;
root.has_rules_or_comments |= call.has_rules_or_comments;
root.has_rulesets |= call.has_rulesets;
root.has_propsets |= call.has_propsets;
block << call;
block.has_rules_or_comments |= call.has_rules_or_comments;
block.has_rulesets |= call.has_rulesets;
block.has_propsets |= call.has_propsets;
semicolon = true;
if (!definition) context.pending.push_back(call);
}
......
......@@ -212,6 +212,11 @@ namespace Sass {
result += ")";
return result;
} break;
case mixin_expansion: {
string result("MIXIN: ");
return result;
} break;
default: {
return string(token);
......@@ -315,10 +320,16 @@ namespace Sass {
buf << ", " << new_prefixes[i];
}
buf << " {";
for (int i = 0; i < block.children->size(); ++i) {
Type stm_type = block.children->at(i).type;
for (int i = 0; i < block.size(); ++i) {
Type stm_type = block[i].type;
if (stm_type == comment || stm_type == rule) {
block.children->at(i).emit_nested_css(buf, depth+1); // NEED OVERLOADED VERSION FOR COMMENTS AND RULES
block[i].emit_nested_css(buf, depth+1); // NEED OVERLOADED VERSION FOR COMMENTS AND RULES
}
else if (stm_type == mixin_expansion) {
buf << endl << string(2*(depth+1), ' ') << block[i].to_string(""); // TEMPORARY
for (int j = 0; j < block[i].size(); ++j) {
block[i][j].emit_nested_css(buf, depth+1);
}
}
}
buf << " }" << endl;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment