Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
xzyfer committed May 2, 2016
1 parent 6d6fab6 commit c75f24d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
16 changes: 5 additions & 11 deletions src/check_nesting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ namespace Sass {
Statement* CheckNesting::operator()(Block* b)
{
parent_stack.push_back(b);
append_block(b);

for (auto n : *b) {
n->perform(this);
}

parent_stack.pop_back();
return b;
}
Expand Down Expand Up @@ -53,14 +57,4 @@ namespace Sass {
dynamic_cast<Directive*>(p) ||
dynamic_cast<Mixin_Call*>(p);
}

void CheckNesting::append_block(Block* b)
{
for (size_t i = 0, L = b->length(); i < L; ++i) {
Statement* ith = (*b)[i]->perform(this);
if (ith) {
(*b)[i] = ith;
}
}
}
}
1 change: 0 additions & 1 deletion src/check_nesting.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ namespace Sass {
Statement* fallback(U x) { return fallback_impl(x); }

bool is_valid_prop_parent(AST_Node*);
void append_block(Block*);
};

}
Expand Down

0 comments on commit c75f24d

Please sign in to comment.