diff options
author | aszlig <aszlig@nix.build> | 2018-07-17 06:13:35 +0200 |
---|---|---|
committer | aszlig <aszlig@nix.build> | 2018-07-19 06:35:15 +0200 |
commit | 19408db5a4eaa309d3f84f6a2d056c5b8b7c8fcb (patch) | |
tree | e660ddbc789361e0a650b2a44893083b9bbfe20e /pkgs/games/itch/default.nix | |
parent | 2d3dabe8af2ea4abc51f68891741db360ad11c75 (diff) |
monogame-patcher: Refactor method ref finding
So far we have searched for methods in two steps: First get all the types and then find all of the constructors or method definitions. The match for the actual method definition was done first for the type and then again for the full definition of the method/constructor. For the replace-call subcommand this also means that we don't have a very good way to find the type, because if we wanted to keep doing this in two steps we would need to parse the type name out of the one given as the replacement string in replace-call. So now we recurse through *all* the constructors and methods and do a full match against the specified replacement string, both for replace-call and for fix-filestreams. Compared to the implementation so far we also do this just once instead of every time we find a call or FileStream constructor. I also overhauled the way we do testing, because in the end writing tests using NUnit would introduce a lot of code churn because we need to make a lot of external calls. The shell is especially useful for exactly that and our tests are now just a plain shell script. Signed-off-by: aszlig <aszlig@nix.build>
Diffstat (limited to 'pkgs/games/itch/default.nix')
0 files changed, 0 insertions, 0 deletions