Commit 0ebb3a53 authored by Custom2043's avatar Custom2043
Browse files

Fix token build

parent 07b00196
...@@ -111,27 +111,26 @@ public class TokenBuilder extends Builder ...@@ -111,27 +111,26 @@ public class TokenBuilder extends Builder
for (Search s : searchesWithIgnore) for (Search s : searchesWithIgnore)
{ {
if (s != this.ignore.getRealSearch()) if (s instanceof ArraySearch) if (s != this.ignore.getRealSearch())
{ if (s instanceof ArraySearch)
Result[] array = results[position].getArray();
Search[] toSearchIn;
List<Result> r = new LinkedList<>();
for (int i=0;i<array.length;i++)
{ {
toSearchIn = ((BracketSearch)array[i].getSearch()).getSearches(); Result[] array = results[position].getArray();
r.add(new Result(new BracketSearch(toSearchIn), this.getResultWithoutIgnores(array[i].getArray(), toSearchIn))); Search[] toSearchIn;
List<Result> r = new LinkedList<>();
for (int i=0;i<array.length;i++)
{
toSearchIn = ((BracketSearch)array[i].getSearch()).getSearches();
r.add(new Result(new BracketSearch(toSearchIn), this.getResultWithoutIgnores(array[i].getArray(), toSearchIn)));
}
resultWithoutIgnore.add(new Result(s, r.toArray(new Result[r.size()])));
} }
else if (s instanceof OrSearch || s instanceof TokenSearch)
resultWithoutIgnore.add(new Result(s, r.toArray(new Result[r.size()]))); resultWithoutIgnore.add(results[position]);
} else if (s instanceof MultipleSearch)
else if (s instanceof OrSearch) resultWithoutIgnore.add(new Result(results[position].getSearch(), this.getResultWithoutIgnores(results[position].getArray(), ((MultipleSearch) s).getSearches())));
resultWithoutIgnore.add(results[1]);
else if (s instanceof MultipleSearch)
resultWithoutIgnore.add(new Result(results[position].getSearch(), this.getResultWithoutIgnores(results[position].getArray(), ((MultipleSearch) s).getSearches())));
else
resultWithoutIgnore.add(results[position]);
position ++; position ++;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment