diff options
Diffstat (limited to 'theme-compiler/src/com/vaadin/sass/tree/MixinDefNode.java')
-rw-r--r-- | theme-compiler/src/com/vaadin/sass/tree/MixinDefNode.java | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/theme-compiler/src/com/vaadin/sass/tree/MixinDefNode.java b/theme-compiler/src/com/vaadin/sass/tree/MixinDefNode.java index b888d01971..a872d13654 100644 --- a/theme-compiler/src/com/vaadin/sass/tree/MixinDefNode.java +++ b/theme-compiler/src/com/vaadin/sass/tree/MixinDefNode.java @@ -19,7 +19,9 @@ package com.vaadin.sass.tree; import java.util.ArrayList; import java.util.Collection; -public class MixinDefNode extends Node { +import com.vaadin.sass.util.DeepCopy; + +public class MixinDefNode extends Node implements IVariableNode { private static final long serialVersionUID = 5469294053247343948L; private String name; @@ -64,4 +66,18 @@ public class MixinDefNode extends Node { this.arglist = arglist; } + @Override + public void replaceVariables(ArrayList<VariableNode> variables) { + for (final VariableNode var : variables) { + for (final VariableNode arg : new ArrayList<VariableNode>(arglist)) { + + if (arg.getName().equals(var.getName())) { + arglist.add(arglist.indexOf(arg), + (VariableNode) DeepCopy.copy(var)); + arglist.remove(arg); + } + } + } + } + } |