Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/pr/1176'
Browse files Browse the repository at this point in the history
  • Loading branch information
mgreter committed May 9, 2015
2 parents ccd3ba2 + 8ae3917 commit 348fde8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions debugger.hpp
Expand Up @@ -264,6 +264,9 @@ inline void debug_ast(AST_Node* node, string ind = "", Env* env = 0)
cerr << ind << "If " << block;
cerr << " (" << pstate_source_position(node) << ")";
cerr << " " << block->tabs() << endl;
debug_ast(block->predicate(), ind + " = ");
debug_ast(block->consequent(), ind + " <>");
debug_ast(block->alternative(), ind + " ><");
} else if (dynamic_cast<Return*>(node)) {
Return* block = dynamic_cast<Return*>(node);
cerr << ind << "Return " << block;
Expand Down
4 changes: 4 additions & 0 deletions eval.cpp
Expand Up @@ -1048,9 +1048,13 @@ namespace Sass {

Expression* Eval::operator()(Parent_Selector* p)
{
// no idea why both calls are needed
Selector* s = p->perform(contextualize);
if (!s) s = p->selector()->perform(contextualize);
// access to parent selector may return 0
Selector_List* l = static_cast<Selector_List*>(s);
// some spec tests cause this (might be a valid case!)
// if (!s) { cerr << "Parent Selector eval error" << endl; }
if (!s) { l = new (ctx.mem) Selector_List(p->pstate()); }
return l->perform(listize);
}
Expand Down

0 comments on commit 348fde8

Please sign in to comment.