pub fn tokenize(args: &[String]) -> Vec<Token>Expand description
Tokenize a slice of CLI arguments into a vector of typed tokens.
Rules:
--alone emitsEndOfOptions; everything after becomesPositional.--nameor--name=valemitsLongFlag.-xemitsShortFlag;-x=valemitsShortFlagwith value;-abc(len > 2, no=) emitsShortCluster.-alone or-42(dash + digit) emitsPositional.- Everything else emits
Positional.