readGreedyTokens

inline fun <T> readGreedyTokens(reader: StringReader, parseToken: (String) -> T): List<T>

Reads every remaining whitespace-separated token of reader, translating each one through parseToken. The callback validates the token and throws a com.mojang.brigadier.exceptions.CommandSyntaxException on invalid input.

This is the shared parsing skeleton of the greedy multi-value argument types (MultiTaggedArgumentType and the script multi-value validator), which all consume one token per value and report errors per token.