A bracket handler is used to resolve ZenTokens inside <tokens>.
In order to do that, ZS will add all tokens inside the brackets to a list and go through all registered bracket handlers to find one that does not return null.
The annotated class simply need to implement IBracketHandler.


CraftTweaker Test Project Bracket Handler

@BracketHandler(priority = 34)
public class BracketWiki implements IBracketHandler{

    public IZenSymbol resolve(IEnvironmentGlobal environment, List<Token> tokens) {
        if ((tokens.size() < 3)) return null; 
        if (!tokens.get(0).getValue().equalsIgnoreCase("devBracket")) return null;
        if (!tokens.get(1).getValue().equals(":")) return null;

        return new devSymbol(tokens);

    private class devSymbol implements IZenSymbol {

        private final String value;
        public devSymbol(List<Token> tokens) {
            StringBuilder sB = new StringBuilder();
            this.value = sB.toString().replaceAll(":", " ");

        public IPartialExpression instance(ZenPosition position) {
            return new ExpressionString(position, "DevSymbol: ".concat(value));



What classes can be annotated || Additional Info