pub fn resolve_code_args(args: &CodeArgs) -> Result<ResolvedCodeArgs>Expand description
Parse the variadic positional args (1..=3) into target, kind, and name.
- 1 arg:
code NAME→ target="self", catch-all. Errors if the single arg is a kind keyword (ambiguous). - 2 args:
code KIND NAMEif arg[0] is a kind keyword, elsecode TARGET NAME(catch-all). - 3 args:
code TARGET KIND NAME— arg[1] must be a valid kind. - 0 or 4+ args: error with usage.