public static RootNode parse(
    final @NotNull TagProvider tagProvider,
    final @NotNull Predicate<String> tagNameChecker,
    final @NotNull String message,
    final @NotNull String originalMessage,
    final boolean strict
  ) throws ParsingException {
    // collect tokens...
    final List<Token> tokens = tokenize(message, false);

    // then build the tree!
    return buildTree(tagProvider, tagNameChecker, tokens, message, originalMessage, strict);
  }
Parse a minimessage string into a tree of nodes.

@param tagProvider provides tags based on the available information
@param tagNameChecker checker for tag names, performing necessary tag normalization
@param message the minimessage string to parse, after processing for preprocess tags
@param originalMessage the string to parse, before preprocess tags
@param strict whether parsing in strict mode
@return the root of the resulting tree
@throws ParsingException if invalid input is provided when in strict mode
@since 4.10.0
text-minimessage/src/main/java/net/kyori/adventure/text/minimessage/internal/parser/TokenParser.java