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