Commit a1173a63 by Aaron Leung

Okay, NOW correctly handling scope wrt mixins. (If a binding exists then change…

Okay, NOW correctly handling scope wrt mixins. (If a binding exists then change it, otherwise make a new one in the topmost (i.e., local) environment.)
parent 21f6a358
......@@ -42,7 +42,12 @@ namespace Sass {
else {
val = eval(val, env);
}
env[expr[0].token] = val;
if (env.query(expr[0].token)) {
env[expr[0].token] = val;
}
else {
env.frame[expr[0].token] = val;
}
return expr;
} break;
......
......@@ -6,8 +6,10 @@ $y: global y;
f-b: $y;
$x: local x changed by foo;
$y: global y changed by foo;
$z: new local z;
f-a: $x;
f-b: $y;
f-c: $z;
}
div {
......
......@@ -5,5 +5,6 @@ div {
f-b: global y;
f-a: local x changed by foo;
f-b: global y changed by foo;
f-c: new local z;
a: global x;
b: global y changed by foo; }
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