Commit 424ca0d1 authored by Custom2043's avatar Custom2043
Browse files

Fix generated variable type

parent 317305df
......@@ -21,8 +21,8 @@ public class VariableGenerator
SearchNameMemory list = paths.get(s);
String type = getTypeOf(lines, list.getSearchArray());
String type = getOrType(lines, list.getSearchArray());
generateVariable(type, s, list.getLevel());
......@@ -45,18 +45,18 @@ public class VariableGenerator
else if (search instanceof OrSearchToken)
return getOrType(lines, ((OrSearchToken)search));
return getOrType(lines, ((OrSearchToken)search).getTypes());
else if (search instanceof BracketSearchToken)
return getTypeOf(lines, ((MultipleSearchToken)search).getTypes());
return RESULT;
private static String getOrType(List<Line> lines, OrSearchToken search)
private static String getOrType(List<Line> lines, SearchToken... search)
String id = null;
boolean string = false;
for (SearchToken t : search.getTypes())
for (SearchToken t : search)
String s = getTypeOf(lines, t);
if (s.equals(RESULT))
Supports Markdown
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