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

Fix token build

parent 07b00196
......@@ -111,27 +111,26 @@ public class TokenBuilder extends Builder
for (Search s : searchesWithIgnore)
{
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++)
if (s != this.ignore.getRealSearch())
if (s instanceof ArraySearch)
{
toSearchIn = ((BracketSearch)array[i].getSearch()).getSearches();
r.add(new Result(new BracketSearch(toSearchIn), this.getResultWithoutIgnores(array[i].getArray(), toSearchIn)));
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();
r.add(new Result(new BracketSearch(toSearchIn), this.getResultWithoutIgnores(array[i].getArray(), toSearchIn)));
}
resultWithoutIgnore.add(new Result(s, r.toArray(new Result[r.size()])));
}
resultWithoutIgnore.add(new Result(s, r.toArray(new Result[r.size()])));
}
else if (s instanceof OrSearch)
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]);
else if (s instanceof OrSearch || s instanceof TokenSearch)
resultWithoutIgnore.add(results[position]);
else if (s instanceof MultipleSearch)
resultWithoutIgnore.add(new Result(results[position].getSearch(), this.getResultWithoutIgnores(results[position].getArray(), ((MultipleSearch) s).getSearches())));
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