(int i, List<String> lines, List<Action> actions)
| 333 | } |
| 334 | |
| 335 | private static int parseAction(int i, List<String> lines, List<Action> actions) { |
| 336 | String ith = lines.get(i); |
| 337 | String[] split = ith.split(" "); |
| 338 | Action.Kind kind = parseKind(split[0]); |
| 339 | Trie filename = Trie.fromString(split[1]); |
| 340 | Range range = split.length > 2 ? parseRange(split[2]) : null; |
| 341 | ArrayList<String> text = new ArrayList<>(); |
| 342 | while (++i < lines.size()) { |
| 343 | ith = lines.get(i); |
| 344 | if (ith.startsWith("---") || ith.startsWith("<<<") || ith.startsWith(">>>") || ith.startsWith("===")) { |
| 345 | break; |
| 346 | } |
| 347 | text.add(ith); |
| 348 | } |
| 349 | actions.add(new Action(kind, filename, range, text)); |
| 350 | return i; |
| 351 | } |
| 352 | |
| 353 | private static Action.Kind parseKind(String line) { |
| 354 | if(line.equals(">>>")) { |
no test coverage detected