Skip to content

Commit 348fde8

Browse files
committed
Merge remote-tracking branch 'origin/pr/1176'
2 parents ccd3ba2 + 8ae3917 commit 348fde8

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

debugger.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,9 @@ inline void debug_ast(AST_Node* node, string ind = "", Env* env = 0)
264264
cerr << ind << "If " << block;
265265
cerr << " (" << pstate_source_position(node) << ")";
266266
cerr << " " << block->tabs() << endl;
267+
debug_ast(block->predicate(), ind + " = ");
268+
debug_ast(block->consequent(), ind + " <>");
269+
debug_ast(block->alternative(), ind + " ><");
267270
} else if (dynamic_cast<Return*>(node)) {
268271
Return* block = dynamic_cast<Return*>(node);
269272
cerr << ind << "Return " << block;

eval.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1048,9 +1048,13 @@ namespace Sass {
10481048

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

0 commit comments

Comments
 (0)