mirror of
https://github.com/danog/dart-sass.git
synced 2024-12-02 17:49:38 +01:00
Support guarded variables.
This commit is contained in:
parent
011a985d9f
commit
9c923fe98a
@ -723,6 +723,11 @@ class _PerformVisitor
|
|||||||
}
|
}
|
||||||
|
|
||||||
Value visitVariableDeclaration(VariableDeclaration node) {
|
Value visitVariableDeclaration(VariableDeclaration node) {
|
||||||
|
if (node.isGuarded) {
|
||||||
|
var value = _environment.getVariable(node.name);
|
||||||
|
if (value != null && value != sassNull) return;
|
||||||
|
}
|
||||||
|
|
||||||
_environment.setVariable(
|
_environment.setVariable(
|
||||||
node.name, node.expression.accept(this).withoutSlash(),
|
node.name, node.expression.accept(this).withoutSlash(),
|
||||||
global: node.isGlobal);
|
global: node.isGlobal);
|
||||||
|
Loading…
Reference in New Issue
Block a user