Graham
651b2f8b5f
Update Guice
...
Signed-off-by: Graham <gpe@openrs2.org>
9 months ago
Graham
4ca7fab636
Add blank line between is blocks
...
Seems to be a recent change in the IDEA formatter.
Signed-off-by: Graham <gpe@openrs2.org>
2 years ago
Graham
f143eef142
Move Kotlin files from src/{main,test}/java to src/{main,test}/kotlin
...
Signed-off-by: Graham <gpe@openrs2.org>
4 years ago
Graham
ce5b76ef0f
Rename dev.openrs2 package to org.openrs2
...
Signed-off-by: Graham <gpe@openrs2.org>
4 years ago
Graham
232ba32bbd
Enable explicit API mode
...
This already caught some cases of public members that should have been
private and one case where the inferred type was too specific.
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
c4df34102a
Run IfElseTransformer until we reach a fixed point
...
It'd be nice if we could make it run a single pass (and there are
probably some improvements to reduce the number of required passes, as
I'm not convinced I'm running the transformations in a particularly
sensible order).
However, I think making it run in a single pass would be quite difficult
as some of the transformations need to propagate through else if chains
or nested if blocks. It's much easier to just run all the
transformations until they settle than fixing each individual
transformation.
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
ea9f212fe1
Reduce indentation of if/else blocks where possible
...
IfElseTransformer is getting rather unwieldy now, so I think I'm going
to split it up in a future commit.
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
90c21d87cf
Replace nested ifs with &&
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
a75db6122b
Return IfStmt from getIf()
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
b20115f1a7
Simplify IfElseTransformer
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
880be759b7
Use smart casts in the AST deobfuscator
...
Many of the old is/as calls were left over from the original Java code.
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
12a0f17e59
Replace ternaries in an else block with another if/else
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
8e3452ef98
Improve IfElseTransformer comments
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
a87a289c49
Add duplicate class name support to the AST deobfuscator
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
3c9edb0291
Use dependency injection in the AST deobfuscator
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
597aa2018e
Add support for whole program AST transforms
4 years ago
Graham
0a988584b7
Convert some deob-ast methods to extension methods
4 years ago
Graham
5487a74eb8
Remove traversal argument from walk extension method
4 years ago
Graham
d9762d65bc
Fix Kotlin inspections
4 years ago
Graham
130a05956e
Convert ExprUtils to Kotlin
4 years ago
Graham
e3baede541
Convert NodeUtils to Kotlin
...
This commit also changes walk() to be an extension function and use reified
generics.
4 years ago
Graham
53160e422d
Convert IfElseTransformer to Kotlin
4 years ago