record code { type_name: i64, text: string, line: i64, column: i64 } record parser_state { codes: list, index: i64 } fn status_code(status: parser_state) -> code { return status::codes[status::index]; } fn start_main() -> i64 { let increment: code = code { type_name: 1, text: "+" , line: 2, column: 7 }; if (increment::type_name not match 1) { return 1; } if (increment::text not match "+") { return 2; } if (increment::line not match 2) { return 3; } if (increment::column not match 7) { return 4; } var status: parser_state = parser_state { codes: [increment], index: 0 }; if (status_code(status)::text not match "+") { return 5; } var moved: parser_state = status; moved::index = 1; if (status::index not match 0) { return 6; } if (moved::index not match 1) { return 7; } moved::codes[0]::column = 9; if (status::codes[0]::column not match 7) { return 8; } if (moved::codes[0]::column not match 9) { return 9; } let exists: result = success(increment); if (exists::ok) { if (exists::value::line not match 2) { return 10; } } else { return 11; } print("3 tokens"); return 0; }