def parse_usage_body
cli@0.2.0.0 · cli.bend:1397
import cli@0.2.0.0/cli.bend as Cli
import Base
1397def parse_usage_body(s: String, +repeat: Bool) -> Usage:
1398 match s:
1399 case SCon{Chr{60}, tail}:
1400 parse_pos(SCon{Char.from_u32(60), tail}, repeat)
1401 case SCon{Chr{91}, tail}:
1402 parse_pos(SCon{Char.from_u32(91), tail}, repeat)
1403 case SCon{Chr{45}, SCon{Chr{45}, tail}}:
1404 parse_long_prefixed(String.append("--", tail), "", repeat, 0n)
1405 case SCon{Chr{45}, tail}:
1406 parse_short(SCon{Char.from_u32(45), tail}, repeat)
1407 case _:
1408 Invalid{0n}