Skip to content

Commit f1b8848

Browse files
author
meri
committed
Multiple minor clean ups. #151
1 parent 1e15a16 commit f1b8848

File tree

6 files changed

+2
-15
lines changed

6 files changed

+2
-15
lines changed

src/main/java/com/github/sommeri/less4j/core/ast/NumberExpression.java

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import java.util.List;
66
import java.util.Map;
77

8-
import com.github.sommeri.less4j.core.ast.NumberExpression.Dimension;
98
import com.github.sommeri.less4j.core.ast.annotations.NotAstProperty;
109
import com.github.sommeri.less4j.core.parser.HiddenTokenAwareTree;
1110

src/main/java/com/github/sommeri/less4j/core/compiler/selectors/SelectorsComparatorForExtend.java

-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ private boolean containsInList(List<SelectorPart> lookForParts, List<SelectorPar
5454
return contains;
5555
}
5656

57-
//FIXME: (!!!) test with combinator before and in the end
5857
private Selector replaceInList(List<SelectorPart> lookForParts, Selector inSelector, List<SelectorPart> originalReplaceBy) {
5958
List<SelectorPart> inSelectorParts = inSelector.getParts();
6059
SelectorPartsListBuilder builder = new SelectorPartsListBuilder();

src/main/java/com/github/sommeri/less4j/core/compiler/selectors/SimpleSelectorComparator.java

+1-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
import com.github.sommeri.less4j.utils.ListsComparator.ListMemberComparator;
1313
import com.github.sommeri.less4j.utils.ListsComparator.MatchMarker;
1414

15-
//FIXME: (!!!!) this whole class mostly ignores leading combinators - need special logic for them
1615
public class SimpleSelectorComparator implements ListMemberComparator<SimpleSelector> {
1716

1817
private final SelectorsComparatorUtils utils;
@@ -156,7 +155,7 @@ private boolean simpleSelectorsElementsEqual(SimpleSelector first, SimpleSelecto
156155
}
157156

158157
private boolean combinatorsEqual(SelectorCombinator cmb1, SelectorCombinator cmb2) {
159-
//FIXME: (!!!) this is here to solve special case, leading combinators must be rethingg
158+
//FIXME: this is here to solve special case, leading combinators must be re-thinked
160159
// the problem is that
161160
/*
162161
* h1 {} has empty leading combinator
@@ -184,7 +183,6 @@ public boolean contains(SimpleSelector lookFor, SimpleSelector inside) {
184183
public SimpleSelector[] splitOn(SimpleSelector lookFor, SimpleSelector inside) {
185184
if (hasNoElement(lookFor)) {
186185
//FIXME: (!!!!) test na tento flow!!!
187-
//FIXME: (!!!!) move to list comparator -what did I meant by that?
188186
List<ElementSubsequent> subsequents = inside.getSubsequent();
189187
HiddenTokenAwareTree underlying = inside.getUnderlyingStructure();
190188

src/main/java/com/github/sommeri/less4j/core/parser/ASTBuilderSwitch.java

-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@
6363
import com.github.sommeri.less4j.core.ast.RuleSet;
6464
import com.github.sommeri.less4j.core.ast.Selector;
6565
import com.github.sommeri.less4j.core.ast.SelectorAttribute;
66-
import com.github.sommeri.less4j.core.ast.SelectorCombinator.Combinator;
6766
import com.github.sommeri.less4j.core.ast.SelectorOperator;
6867
import com.github.sommeri.less4j.core.ast.SelectorPart;
6968
import com.github.sommeri.less4j.core.ast.SignedExpression;

src/main/java/com/github/sommeri/less4j/utils/ArraysUtils.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public static <T> List<T> sublistWithoutFirst(List<T> values) {
4545

4646
public static <T> List<T> safeSublist(List<T> values, int from, int to) {
4747
if (values.isEmpty())
48-
return null; //FIXME: (!!) change to return empty? or remove?
48+
return null;
4949

5050
if (from>to)
5151
return new ArrayList<T>();

src/main/java/com/github/sommeri/less4j/utils/ListsComparator.java

-8
Original file line numberDiff line numberDiff line change
@@ -132,14 +132,6 @@ public <T> List<MatchMarker<T>> collectMatches(List<T> lookFor, List<T> inList,
132132
return result;
133133
}
134134

135-
private <T> boolean containsInList(T lookFor, List<T> inParts, ListMemberComparator<T> comparator) {
136-
for (T inPart : inParts) {
137-
if (comparator.contains(lookFor, inPart))
138-
return true;
139-
}
140-
return false;
141-
}
142-
143135
private <T> List<MatchMarker<T>> collectMatches(T lookFor, List<T> inParts, ListMemberComparator<T> comparator, List<MatchMarker<T>> result) {
144136
for (T inPart : inParts) {
145137
if (comparator.contains(lookFor, inPart))

0 commit comments

Comments
 (0)