aboutsummaryrefslogtreecommitdiffstats
path: root/theme-compiler/src/com/vaadin/sass/tree/ListContainsNode.java
diff options
context:
space:
mode:
Diffstat (limited to 'theme-compiler/src/com/vaadin/sass/tree/ListContainsNode.java')
-rw-r--r--theme-compiler/src/com/vaadin/sass/tree/ListContainsNode.java31
1 files changed, 31 insertions, 0 deletions
diff --git a/theme-compiler/src/com/vaadin/sass/tree/ListContainsNode.java b/theme-compiler/src/com/vaadin/sass/tree/ListContainsNode.java
new file mode 100644
index 0000000000..1a9ace88a5
--- /dev/null
+++ b/theme-compiler/src/com/vaadin/sass/tree/ListContainsNode.java
@@ -0,0 +1,31 @@
+package com.vaadin.sass.tree;
+
+import java.util.ArrayList;
+
+import com.vaadin.sass.parser.LexicalUnitImpl;
+
+public class ListContainsNode extends ListModifyNode {
+
+ public ListContainsNode(String variable, String list, String contains,
+ String separator) {
+ this.variable = variable;
+ checkSeparator(separator, list);
+ populateList(list, contains);
+ }
+
+ @Override
+ protected void modifyList(ArrayList<String> newList) {
+ // Does not actually modify the list
+ }
+
+ @Override
+ public VariableNode getModifiedList() {
+
+ String contains = "" + list.containsAll(modify);
+ VariableNode node = new VariableNode(variable.substring(1),
+ LexicalUnitImpl.createString(contains), false);
+ return node;
+
+ }
+
+}