Graham
b37e4d0d0b
Use alternatives for most methods deprecated in Kotlin 1.5
...
Signed-off-by: Graham <gpe@openrs2.org>
3 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
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
bde818230b
Use smart casts in hasSideEffects()
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
8f0dfd2725
Fix FieldAccessExpr's hasSideEffects() implementation
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
919d9c2386
Add ThisExpr to hasSideEffects()
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
9cd19e3708
Add HexLiteralTransformer
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
29b63b613a
Use > and >= in for loops that decrement instead of increment
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
d33c03c708
Improve Expression.negate()
...
This commit makes two changes:
* Uses the is operator instead of the isXXX methods provided by
JavaParser, allowing smart casts to be used.
* Wraps unsupported expressions with a unary minus expression, rather
than throwing an exception.
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
9de55399f5
Convert createLong to an extension method on Long
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
25a6953644
Fix use of deprecated JavaParser methods
4 years ago
Graham
d9762d65bc
Fix Kotlin inspections
4 years ago
Graham
e9a9a8f962
Format with ktlint
4 years ago
Graham
130a05956e
Convert ExprUtils to Kotlin
4 years ago