(int i, List<String> lines, List<Frame> frames)
| 306 | } |
| 307 | |
| 308 | private static int parseFrame(int i, List<String> lines, List<Frame> frames) { |
| 309 | ArrayList<Action> actions = new ArrayList<>(); |
| 310 | while(i < lines.size()) { |
| 311 | String ith = lines.get(i); |
| 312 | if(ith.startsWith("===")) { |
| 313 | // No error markers in this frame |
| 314 | frames.add(new Frame(actions,Collections.emptyList())); |
| 315 | return i+1; |
| 316 | } else if(ith.startsWith("---")) { |
| 317 | i = i + 1; |
| 318 | break; |
| 319 | } |
| 320 | i = parseAction(i,lines,actions); |
| 321 | } |
| 322 | ArrayList<Error> errors = new ArrayList<>(); |
| 323 | while(i < lines.size()) { |
| 324 | String ith = lines.get(i); |
| 325 | if(ith.startsWith("===")) { |
| 326 | i = i + 1; |
| 327 | break; |
| 328 | } |
| 329 | errors.add(parseError(lines.get(i++))); |
| 330 | } |
| 331 | frames.add(new Frame(actions,errors)); |
| 332 | return i; |
| 333 | } |
| 334 | |
| 335 | private static int parseAction(int i, List<String> lines, List<Action> actions) { |
| 336 | String ith = lines.get(i); |
no test coverage detected