| 59 | } |
| 60 | |
| 61 | static bool gi_parse_pass(gi_parse_t *parse) { |
| 62 | size_t cursor = 0; |
| 63 | while (cursor < parse->length) { |
| 64 | gi_view_t view; |
| 65 | if (!gi_line(parse, &cursor, &view)) { |
| 66 | return false; |
| 67 | } |
| 68 | if (!view.length) { |
| 69 | continue; |
| 70 | } |
| 71 | if (parse->program) { |
| 72 | if (!gi_store_pattern(parse, &view)) { |
| 73 | return false; |
| 74 | } |
| 75 | } else { |
| 76 | if (!gi_pattern_reserve(parse->guard)) { |
| 77 | return false; |
| 78 | } |
| 79 | parse->count++; |
| 80 | } |
| 81 | } |
| 82 | return true; |
| 83 | } |
| 84 | |
| 85 | static bool gi_parse_storage(gi_parse_t *parse) { |
| 86 | size_t count = parse->count; |
no test coverage detected