def close
import cswap-bend-cli@0.1.0.0/fmt/csv.bend as Csvimport Base
160# The input ended: close the record in progress.
161def close(m: Mode, +st: St) -> St:
162 match m:
163 case MStart{}:
164 blank.pick(row_empty(st), st)
165 case MQuoted{}:
166 fail(st, "unterminated quoted field")
167 case MPlain{}:
168 end_both(st)
169 case MClosed{}:
170 end_both(st)