public static List<Token> tokenize(final String message, final boolean lenient) {
    final TokenListProducingMatchedTokenConsumer listProducer = new TokenListProducingMatchedTokenConsumer(message);
    parseString(message, lenient, listProducer);
    final List<Token> tokens = listProducer.result();
    parseSecondPass(message, tokens);
    return tokens;
  }
Tokenize a minimessage string into a list of tokens.

@param message the minimessage string to parse
@param lenient whether to allow section symbols (for escaping/stripping/non-actual-parse stuff only)
@return the root tokens
@since 4.10.0
text-minimessage/src/main/java/net/kyori/adventure/text/minimessage/internal/parser/TokenParser.java