MinecraftForge / Srg2Source

Applies source level refactors to java source code.
GNU Lesser General Public License v2.1
60 stars 32 forks source link

Change RangeMap to be a hierarchy of structures with entries #51

Open theWituch opened 2 years ago

theWituch commented 2 years ago

This PR changes much of way RangeMap is built and how RangeAplier uses it to process java source file. RangeMap specification stays same.

At first, it changes data model of RangeMap:

Secondly, this changes RangeApplier to process RangeMap:

In each case all tests passes. It needed to correct some patterns (misplaced entries).

I don't know how you planned to do this kind of feature, but i think my solution will be very comfortable to expand processing functionality in future. This is good start to other features such:

If something is unclear or need to correct, please give me feedback.