Support guarded variables.

This commit is contained in:
Natalie Weizenbaum 2016-10-21 21:56:27 -07:00
parent 011a985d9f
commit 9c923fe98a

View File

@ -723,6 +723,11 @@ class _PerformVisitor
}
Value visitVariableDeclaration(VariableDeclaration node) {
if (node.isGuarded) {
var value = _environment.getVariable(node.name);
if (value != null && value != sassNull) return;
}
_environment.setVariable(
node.name, node.expression.accept(this).withoutSlash(),
global: node.isGlobal);