mirror of
https://github.com/revanced/smali.git
synced 2025-05-04 08:34:25 +02:00
Print verbose errors in the tree walker
This commit is contained in:
parent
a59fe7e523
commit
d317a0679d
@ -52,6 +52,11 @@ import org.jf.dexlib.Code.Format.*;
|
||||
@members {
|
||||
public DexFile dexFile;
|
||||
public TypeIdItem classType;
|
||||
private boolean verboseErrors = false;
|
||||
|
||||
public void setVerboseErrors(boolean verboseErrors) {
|
||||
this.verboseErrors = verboseErrors;
|
||||
}
|
||||
|
||||
private byte parseRegister_nibble(String register, int totalMethodRegisters, int methodParameterRegisters)
|
||||
throws SemanticException {
|
||||
@ -141,11 +146,13 @@ smali_file
|
||||
classDataItem, $fields.staticFieldInitialValues);
|
||||
};
|
||||
catch [Exception ex] {
|
||||
if (verboseErrors) {
|
||||
ex.printStackTrace(System.err);
|
||||
}
|
||||
reportError(new SemanticException(input, ex));
|
||||
}
|
||||
|
||||
|
||||
|
||||
header returns[TypeIdItem classType, int accessFlags, TypeIdItem superType, TypeListItem implementsList, StringIdItem sourceSpec]
|
||||
: class_spec super_spec? implements_list source_spec
|
||||
{
|
||||
|
@ -318,7 +318,7 @@ public class main {
|
||||
treeStream.setTokenStream(tokens);
|
||||
|
||||
smaliTreeWalker dexGen = new smaliTreeWalker(treeStream);
|
||||
|
||||
dexGen.setVerboseErrors(verboseErrors);
|
||||
dexGen.dexFile = dexFile;
|
||||
dexGen.smali_file();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user