def slot_traits_go
cli@0.2.0.0 · cli.bend:2906
import cli@0.2.0.0/cli.bend as Cli
import Base
2906
2907
2908
2909def slot_traits_go(slots: List<&2, ArgInfo>, count: Nat, here: Bool) ->
2910 SlotTraits:
2911 match slots here:
2912 case Nil{} _: SlotTraits{False{}, False{}, False{}}
2913 case ArgInfo{id, usage, short, long, kind, +attrs} <> tail True{}:
2914 SlotTraits{has_rest(attrs), has_hyphen(attrs), has_as_f32(attrs)}
2915 case info <> +tail False{}:
2916 +rest = Nat.sub(count, 1n)
2917 next = slot_here(tail, rest)
2918 slot_traits_go(tail, rest, next)