let rec move_robot (pos: int) (dir: string) (num_moves: int) : int =
let new_forward_position = pos + num_moves in
if (new_forward_position > 99) then failwith "cannot move beyond 99 steps"
else new_forward_position
let new_backward_position = pos - num_moves in
if (new_backward_position pos < 0) then failwith "cannot move less than 0 steps"
else new_backward_position
begin match dir with
| "forward" -> new_forward position
| "backward" -> new_backward_position
end
let new_backward_position 行で「予期しないトークン」が引き続き取得されます。私のエラーは何ですか?