From 9c923fe98a46a1d703a6f02a5606651f9f0f2ab5 Mon Sep 17 00:00:00 2001 From: Natalie Weizenbaum Date: Fri, 21 Oct 2016 21:56:27 -0700 Subject: [PATCH] Support guarded variables. --- lib/src/visitor/perform.dart | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/src/visitor/perform.dart b/lib/src/visitor/perform.dart index 32fe9487..87162cb6 100644 --- a/lib/src/visitor/perform.dart +++ b/lib/src/visitor/perform.dart @@ -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);