(state: DateState)
| 1664 | } |
| 1665 | |
| 1666 | const processDateNext = (state: DateState) => { |
| 1667 | const next = state.dateParts[state.cursor].nextPart() |
| 1668 | const cursor = Option.match(next, { |
| 1669 | onNone: () => state.dateParts.findIndex((part) => !part.isToken()), |
| 1670 | onSome: (next) => state.dateParts.indexOf(next) |
| 1671 | }) |
| 1672 | return Action.NextFrame({ |
| 1673 | state: { ...state, cursor } |
| 1674 | }) |
| 1675 | } |
| 1676 | |
| 1677 | const defaultDateProcessor = (value: string, state: DateState) => { |
| 1678 | if (/\d/.test(value)) { |
no test coverage detected