def finish_name
import cli@0.2.0.0/cli.bend as Cliimport Base
1253# rev is the name so far, reversed.
1254def finish_name(rev: String, rest: String, +pos: Nat,
1255 +first: Bool, +dot_start: Nat) -> NameScan:
1256 Bool.pick(NameScan, Bool.or(first, Nat.is_lt(dot_start, pos)),
1257 NameBad{Bool.pick(Nat, first, pos, dot_start)},
1258 NameOK{String.reverse(rev), rest, pos})