Skip to content

Commit

Permalink
Improve function call return value handling
Browse files Browse the repository at this point in the history
Fixes sass#1269
  • Loading branch information
mgreter committed Jun 30, 2015
1 parent c23b76a commit 5c4c806
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions eval.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ namespace Sass {
rhs = rhs->perform(this);
}

// see if it's a relational expression
// upgrade string to number if possible (issue #948)
switch(op_type) {
case Binary_Expression::EQ: return new (ctx.mem) Boolean(b->pstate(), eq(lhs, rhs, ctx));
case Binary_Expression::NEQ: return new (ctx.mem) Boolean(b->pstate(), !eq(lhs, rhs, ctx));
Expand Down Expand Up @@ -692,19 +692,17 @@ namespace Sass {
env = old_env;
}

// backtrace = here.parent;
// env = old_env;
// link back to function definition
// only do this for custom functions


// link back to function definition
// only do this for custom functions
if (result->pstate().file == string::npos)
result->pstate(c->pstate());

do {
result->is_delayed(result->concrete_type() == Expression::STRING);
result = result->perform(this);
} while (result->concrete_type() == Expression::NONE);
result->is_delayed(result->concrete_type() == Expression::STRING);
if (!result->is_delayed()) result = result->perform(this);
return result;
}

Expand Down

0 comments on commit 5c4c806

Please sign in to comment.