|
|
|
@ -51,8 +51,8 @@ public class ConditionParser { |
|
|
|
|
|
|
|
|
|
public static void main(String argv[]) { |
|
|
|
|
ConditionParser parser = new ConditionParser(); |
|
|
|
|
List<String> defines = parser.extractDefines("(LightMap && SeparateTexCoord) || !ColorMap"); |
|
|
|
|
|
|
|
|
|
//List<String> defines = parser.extractDefines("(LightMap && SeparateTexCoord) || !ColorMap");
|
|
|
|
|
List<String> defines = parser.extractDefines("RoughnessMap && MetallicRoughnessMap"); |
|
|
|
|
for (String string : defines) { |
|
|
|
|
System.err.println(string); |
|
|
|
|
} |
|
|
|
@ -99,7 +99,7 @@ public class ConditionParser { |
|
|
|
|
while (m.find()) { |
|
|
|
|
String match = m.group(); |
|
|
|
|
defines.add(match); |
|
|
|
|
formattedExpression = formattedExpression.replaceAll(match, "defined(" + match.toUpperCase() + ")"); |
|
|
|
|
formattedExpression = formattedExpression.replaceAll("\\b" + match + "\\b", "defined(" + match.toUpperCase() + ")"); |
|
|
|
|
} |
|
|
|
|
return defines; |
|
|
|
|
} |
|
|
|
|