use of stanhebben.zenscript.compiler.IEnvironmentGlobal in project CraftTweaker by CraftTweaker.
the class BracketHandlerItem method find.
private IZenSymbol find(IEnvironmentGlobal environment, List<Token> tokens, int startIndex, int endIndex, int meta) {
StringBuilder valueBuilder = new StringBuilder();
for (int i = startIndex; i < endIndex; i++) {
Token token = tokens.get(i);
valueBuilder.append(token.getValue());
}
String itemName = valueBuilder.toString();
if (itemNames.containsKey(itemName) || blockNames.containsKey(itemName)) {
return position -> new ExpressionCallStatic(position, environment, method, new ExpressionString(position, valueBuilder.toString()), new ExpressionInt(position, meta, ZenType.INT));
}
return null;
}
Aggregations