Closed sandybrownlee closed 3 years ago
This could also include the code in Patch.randomEdit()
There's a general difficulty of exactly how we identify (for example) a statement that is to be modified or removed: currently we use a numbering scheme, which is not general and something of a hack. Need an alternative idea.
Refactoring with v2 fixed this.
Currently, the Edit classes are just wrappers for ints, which are then used by Patch.apply(). It would be cleaner to put the operation in each of the Edit classes - though this would mean they have access to the lists of statements and blocks in Patch so not easy to separate out.